Ensure .class files aren't present in the resources library MR jar (#9245)
This commit is contained in:
parent
23c20dadaf
commit
6ac134b19f
|
@ -50,9 +50,17 @@ for (version in mrJarVersions) {
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
withType(Jar::class) {
|
withType(Jar::class) {
|
||||||
|
val sourcePathProvider = if (name == "jar") {
|
||||||
|
{ ss: SourceSet? -> ss?.output }
|
||||||
|
} else if (name == "sourcesJar") {
|
||||||
|
{ ss: SourceSet? -> ss?.java }
|
||||||
|
} else {
|
||||||
|
{ project.objects.fileCollection() }
|
||||||
|
}
|
||||||
|
|
||||||
for (version in mrJarVersions) {
|
for (version in mrJarVersions) {
|
||||||
into("META-INF/versions/$version") {
|
into("META-INF/versions/$version") {
|
||||||
from(sourceSets["java$version"].output)
|
from(sourcePathProvider(sourceSets["java$version"]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
manifest.attributes(
|
manifest.attributes(
|
||||||
|
|
Loading…
Reference in New Issue