Skip to content

Commit

Permalink
Disable incremental compilation in CI environments
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-vieira committed Dec 12, 2023
1 parent fc0561b commit 7207db4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build-conventions/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,7 @@ project.getPlugins().withType(JavaBasePlugin.class) {
}
}
}

tasks.withType(JavaCompile).configureEach {
options.incremental = System.getenv("JENKINS_URL") == null && System.getenv("BUILDKITE_BUILD_URL") == null
}
1 change: 1 addition & 0 deletions build-tools-internal/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ sourceSets {

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
options.incremental = System.getenv("JENKINS_URL") == null && System.getenv("BUILDKITE_BUILD_URL") == null
}

tasks.named('licenseHeaders').configure {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ public static void configureCompile(Project project) {
compileTask.getConventionMapping().map("sourceCompatibility", () -> java.getSourceCompatibility().toString());
compileTask.getConventionMapping().map("targetCompatibility", () -> java.getTargetCompatibility().toString());
compileOptions.getRelease().set(releaseVersionProviderFromCompileTask(project, compileTask));
compileOptions.setIncremental(BuildParams.isCi() == false);
});
// also apply release flag to groovy, which is used in build-tools
project.getTasks().withType(GroovyCompile.class).configureEach(compileTask -> {
Expand Down
4 changes: 4 additions & 0 deletions build-tools/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ dependencies {

}

tasks.withType(JavaCompile).configureEach {
options.incremental = System.getenv("JENKINS_URL") == null && System.getenv("BUILDKITE_BUILD_URL") == null
}

tasks.named('test').configure {
useJUnitPlatform()
}
Expand Down

0 comments on commit 7207db4

Please sign in to comment.