mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-16 18:04:52 +00:00
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 {
|
allprojects {
|
||||||
|
apply plugin: 'java'
|
||||||
targetCompatibility = 11
|
targetCompatibility = 11
|
||||||
sourceCompatibility = 11
|
sourceCompatibility = 11
|
||||||
}
|
}
|
||||||
@ -85,6 +86,13 @@ compileMinimumRuntimeJava {
|
|||||||
sourceCompatibility = 8
|
sourceCompatibility = 8
|
||||||
}
|
}
|
||||||
|
|
||||||
|
normalization {
|
||||||
|
runtimeClasspath {
|
||||||
|
// Ignore the embedded JAR as we track this separately below as a runtime dependency
|
||||||
|
ignore 'META-INF/*.jar'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
from sourceSets.minimumRuntime.output
|
from sourceSets.minimumRuntime.output
|
||||||
into('META-INF') {
|
into('META-INF') {
|
||||||
@ -143,6 +151,10 @@ if (project == rootProject) {
|
|||||||
mavenLocal()
|
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
|
// only run tests as build-tools
|
||||||
test.enabled = false
|
test.enabled = false
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
apply plugin: 'java'
|
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
attributes 'Main-Class': 'org.elasticsearch.gradle.reaper.Reaper'
|
attributes 'Main-Class': 'org.elasticsearch.gradle.reaper.Reaper'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user