Fix for build runtime classpath instability (#45347)
(cherry picked from commit dee4ee2f0d4190ab54d0a4f0aa251d8c03e9db6d)
This commit is contained in:
parent
a552b33276
commit
214cbb28df
|
@ -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
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
apply plugin: 'java'
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes 'Main-Class': 'org.elasticsearch.gradle.reaper.Reaper'
|
||||
|
|
Loading…
Reference in New Issue