mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 09:28:55 -04:00
Disable incremental compilation in CI environments (#103346)
This commit is contained in:
parent
e2f48f0409
commit
a9546a07f2
5 changed files with 13 additions and 1 deletions
|
@ -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 && System.getProperty("isCI") == null
|
||||
}
|
||||
|
|
|
@ -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 && System.getProperty("isCI") == null
|
||||
}
|
||||
|
||||
tasks.named('licenseHeaders').configure {
|
||||
|
|
|
@ -132,6 +132,7 @@ public class ElasticsearchJavaBasePlugin implements Plugin<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 -> {
|
||||
|
|
|
@ -124,7 +124,9 @@ public class GlobalBuildInfoPlugin implements Plugin<Project> {
|
|||
params.setGitOrigin(gitInfo.getOrigin());
|
||||
params.setBuildDate(ZonedDateTime.now(ZoneOffset.UTC));
|
||||
params.setTestSeed(getTestSeed());
|
||||
params.setIsCi(System.getenv("JENKINS_URL") != null || System.getenv("BUILDKITE_BUILD_URL") != null);
|
||||
params.setIsCi(
|
||||
System.getenv("JENKINS_URL") != null || System.getenv("BUILDKITE_BUILD_URL") != null || System.getProperty("isCI") != null
|
||||
);
|
||||
params.setDefaultParallel(ParallelDetector.findDefaultParallel(project));
|
||||
params.setInFipsJvm(Util.getBooleanProperty("tests.fips.enabled", false));
|
||||
params.setIsSnapshotBuild(Util.getBooleanProperty("build.snapshot", true));
|
||||
|
|
|
@ -158,6 +158,10 @@ dependencies {
|
|||
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.incremental = System.getenv("JENKINS_URL") == null && System.getenv("BUILDKITE_BUILD_URL") == null && System.getProperty("isCI") == null
|
||||
}
|
||||
|
||||
tasks.named('test').configure {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue