Skip to content

Commit

Permalink
[#2335] Ensure module info is included in all release jars
Browse files Browse the repository at this point in the history
  • Loading branch information
remkop committed Aug 31, 2024
1 parent b03121b commit a25cfd4
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 27 deletions.
36 changes: 36 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
# picocli Release Notes

# <a name="4.7.7"></a> Picocli 4.7.7
The picocli community is pleased to announce picocli 4.7.7.

This release includes bugfixes and enhancements.

Many thanks to the picocli community for raising these issues and providing the pull requests to address them!

This is the eighty-sixth public release.
Picocli follows [semantic versioning](https://semver.org/).
Artifacts in this release are signed by Remko Popma (6601 E5C0 8DCC BB96).

## <a name="4.7.7-toc"></a> Table of Contents
* [New and noteworthy](#4.7.7-new)
* [Fixed issues](#4.7.7-fixes)
* [Deprecations](#4.7.7-deprecated)
* [Potential breaking changes](#4.7.7-breaking-changes)

## <a name="4.7.7-new"></a> New and Noteworthy




## <a name="4.7.7-fixes"></a> Fixed issues

* [#2335] Module info missing in all jars except the main picocli jar file. Thanks to [Oliver B. Fischer](https://github.com/obfischer) for raising this.



## <a name="4.7.7-deprecated"></a> Deprecations
No features were deprecated in this release.

## <a name="4.7.7-breaking-changes"></a> Potential breaking changes
This release has no breaking changes.



# <a name="4.7.6"></a> Picocli 4.7.6
The picocli community is pleased to announce picocli 4.7.6.

Expand Down
28 changes: 1 addition & 27 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ buildscript {
}
}

apply plugin: 'org.beryx.jar' // for compiling module-info on Java 8
apply plugin: 'io.codearte.nexus-staging'

if (System.getenv('MAVEN_OSS_USER')) { // on home system
Expand Down Expand Up @@ -61,7 +62,6 @@ pluginManager.withPlugin('biz.aQute.bnd.builder') { // if plugin applied, execut
allprojects {
apply plugin: 'java'
apply plugin: 'java-library' // to avoid https://github.com/gradle/gradle/issues/1118
apply plugin: 'org.beryx.jar' // for compiling module-info on Java 8

// https://errorprone.info/docs/installation requires Java 11+
if (JavaVersion.current().isJava11Compatible()) {
Expand Down Expand Up @@ -121,32 +121,6 @@ allprojects {
// Workaround frpm https://bugs.openjdk.org/browse/JDK-4973681
javadoc.options.addStringOption('sourcepath', 'src/main/java')

if (!project.name in ['picocli-examples', 'picocli-annotation-processing-tests']) {
//sourceSets.main.java.srcDirs = ['src/main/java', 'src/main/java9']
compileJava {
inputs.property("moduleName", moduleName)
// doFirst {
// logger.info("Java version is " + JavaVersion.current())
// if (JavaVersion.current().isJava9Compatible()) {
// options.compilerArgs = [
// '--module-path', classpath.asPath,
// ]
// }
// // classpath = files()
// classpath = sourceSets.main.runtimeClasspath
// logger.info("options.compilerArgs is " + options.compilerArgs)
// logger.info("classpath is " + classpath.files)
// }
}
moduleConfig {
// copy module-info.class to META-INF/versions/9
multiReleaseVersion = 9
moduleInfoPath = 'src/main/java9/module-info.java'
version = project.version
neverCompileModuleInfo = true
}
}

normalization {
runtimeClasspath {
metaInf {
Expand Down
12 changes: 12 additions & 0 deletions picocli-codegen/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ dependencies {
api rootProject
}

apply plugin: 'org.beryx.jar' // for compiling module-info on Java 8
compileJava {
inputs.property("moduleName", moduleName)
}
moduleConfig {
// copy module-info.class to META-INF/versions/9
multiReleaseVersion = 9
moduleInfoPath = 'src/main/java9/module-info.java'
version = project.version
neverCompileModuleInfo = true
}

//task generateGraalReflectionConfig(type: JavaExec) {
// mainClass = 'picocli.codegen.aot.graalvm.ReflectionConfigGenerator'
// classpath = sourceSets.main.runtimeClasspath
Expand Down
12 changes: 12 additions & 0 deletions picocli-groovy/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ description 'Picocli Groovy - easily use picocli in Groovy scripts.'
version "$projectVersion"
ext.moduleName = 'info.picocli.groovy'

apply plugin: 'org.beryx.jar' // for compiling module-info on Java 8
compileJava {
inputs.property("moduleName", moduleName)
}
moduleConfig {
// copy module-info.class to META-INF/versions/9
multiReleaseVersion = 9
moduleInfoPath = 'src/main/java9/module-info.java'
version = project.version
neverCompileModuleInfo = true
}

configurations {
ivy
}
Expand Down
12 changes: 12 additions & 0 deletions picocli-shell-jline2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ dependencies {
api supportDependencies.jline2
}

apply plugin: 'org.beryx.jar' // for compiling module-info on Java 8
compileJava {
inputs.property("moduleName", moduleName)
}
moduleConfig {
// copy module-info.class to META-INF/versions/9
multiReleaseVersion = 9
moduleInfoPath = 'src/main/java9/module-info.java'
version = project.version
neverCompileModuleInfo = true
}

jar {
manifest {
attributes 'Specification-Title' : 'Picocli Shell JLine2',
Expand Down
12 changes: 12 additions & 0 deletions picocli-shell-jline3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ dependencies {
api supportDependencies.jline3
}

apply plugin: 'org.beryx.jar' // for compiling module-info on Java 8
compileJava {
inputs.property("moduleName", moduleName)
}
moduleConfig {
// copy module-info.class to META-INF/versions/9
multiReleaseVersion = 9
moduleInfoPath = 'src/main/java9/module-info.java'
version = project.version
neverCompileModuleInfo = true
}

jar {
manifest {
attributes 'Specification-Title' : 'Picocli Shell JLine3',
Expand Down
12 changes: 12 additions & 0 deletions picocli-spring-boot-starter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ if (useJava17) {
targetCompatibility = 1.8
}

apply plugin: 'org.beryx.jar' // for compiling module-info on Java 8
compileJava {
inputs.property("moduleName", moduleName)
}
moduleConfig {
// copy module-info.class to META-INF/versions/9
multiReleaseVersion = 9
moduleInfoPath = 'src/main/java9/module-info.java'
version = project.version
neverCompileModuleInfo = true
}

dependencies {
api rootProject
if (useJava17) {
Expand Down

0 comments on commit a25cfd4

Please sign in to comment.