diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 8232ce63f23..b8a7411a956 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -72,6 +72,7 @@ sourceSets { } allprojects { + apply plugin: 'java' targetCompatibility = 11 sourceCompatibility = 11 } @@ -85,6 +86,13 @@ compileMinimumRuntimeJava { sourceCompatibility = 8 } +normalization { + runtimeClasspath { + // Ignore the embedded JAR as we track this separately below as a runtime dependency + ignore 'META-INF/*.jar' + } +} + jar { from sourceSets.minimumRuntime.output into('META-INF') { @@ -143,6 +151,10 @@ if (project == rootProject) { mavenLocal() } } + dependencies { + // add this so the runtime classpath so Gradle will properly track it as a build runtime classpath input + runtimeOnly project('reaper') + } // only run tests as build-tools test.enabled = false } diff --git a/buildSrc/reaper/build.gradle b/buildSrc/reaper/build.gradle index 242dfcafaaa..8613d049da2 100644 --- a/buildSrc/reaper/build.gradle +++ b/buildSrc/reaper/build.gradle @@ -1,5 +1,3 @@ -apply plugin: 'java' - jar { manifest { attributes 'Main-Class': 'org.elasticsearch.gradle.reaper.Reaper'