uschindler commented on PR #13146:
URL: https://github.com/apache/lucene/pull/13146#issuecomment-1971597031
Hi,
I will make a separate PR for this: At moment the Java 21 separate sourceSet
is a MRJAR version section. At the moment we would not need a MR-JAR, as we can
merge the classes together, so I propose to add this code:
```groovy
tasks.named('jar').configure {
boolean needMRJAR = false;
mrjarJavaVersions.each { jdkVersion ->
boolean isBaseVersion = (jdkVersion.toString() ==
rootProject.minJavaVersion.toString())
into(isBaseVersion ? '' : "META-INF/versions/${jdkVersion}") {
from sourceSets["main${jdkVersion}"].output
}
needMRJAR |= !isBaseVersion
}
if (needMRJAR) {
manifest.attributes(
'Multi-Release': 'true'
)
}
}
```
This copies the files from the `main21` sourceset to the JAR's main folder.
It only enables `Multi-Release: true` manifest entry, if there is another java
version != the base java version (21) available.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]