diff --git a/examples/build.gradle.kts b/examples/build.gradle.kts index 4e0abaa0..f09bed60 100644 --- a/examples/build.gradle.kts +++ b/examples/build.gradle.kts @@ -10,6 +10,7 @@ exampleTestTasks += tasks.register("runExampleScript") { group = "Application" description = "Runs the 'example-script.main.kts' script" commandLine("kotlinc", "-script", file("example-script.main.kts")) + environment("JAVA_OPTS", "-Xmx1g") } exampleTestTasks += tasks.register("runExampleProject") { diff --git a/examples/example-project/gradle.properties b/examples/example-project/gradle.properties index 18f452c7..5b8859a1 100644 --- a/examples/example-project/gradle.properties +++ b/examples/example-project/gradle.properties @@ -1,6 +1,6 @@ # This file was generated by the Gradle 'init' task. # https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties - +org.gradle.jvmargs=-Xmx1g org.gradle.parallel=true org.gradle.caching=true diff --git a/examples/example-script.main.kts b/examples/example-script.main.kts index b54e89e5..44f17ea1 100644 --- a/examples/example-script.main.kts +++ b/examples/example-script.main.kts @@ -13,6 +13,8 @@ * * - "Some are doing check builds locally, which we set up to trigger our notably slow * legacy tests. We should suggest they run test instead, leaving check for CI to run." + * + * Run this with at least 1GB of heap to accomodate the fetched data: JAVA_OPTS=-Xmx1g */ @file:DependsOn("com.gabrielfeo:gradle-enterprise-api-kotlin:2023.1.0") diff --git a/gradle.properties b/gradle.properties index 0e9dad0a..a05833ab 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,6 +2,6 @@ org.gradle.jvmargs=-Xmx5g org.gradle.caching=true version=SNAPSHOT # Must be later than 2022.1 -gradle.enterprise.version=2023.1 +gradle.enterprise.version=2023.2 group=com.gabrielfeo artifact=gradle-enterprise-api-kotlin diff --git a/library/build.gradle.kts b/library/build.gradle.kts index 44281527..65e04807 100644 --- a/library/build.gradle.kts +++ b/library/build.gradle.kts @@ -40,7 +40,7 @@ val downloadApiSpec by tasks.registering { openApiGenerate { generatorName.set("kotlin") val spec = when { - localSpecPath.isPresent() -> localSpecPath.map { File(it).absolutePath } + localSpecPath.isPresent() -> localSpecPath.map { rootProject.file(it).absolutePath } else -> downloadApiSpec.map { it.outputs.files.first().absolutePath } } inputSpec.set(spec)