diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 2e45e973f..b26ed5d31 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -208,6 +208,7 @@ This allows picocli-based native image applications that use `@Command`-annotate - [#645] Codegen: Exclude Jansi Console from generated GraalVM reflection configuration. Thanks to [shanetreacy](https://github.com/shanetreacy) for raising this. - [#686] Codegen: Add support for `@Command` interfaces (dynamic proxies) in GraalVM native image. - [#669] Codegen: Add support for resource bundles in GraalVM native image. +- [#674] JPMS module: move module-info.class to root of jar. - [#676] Bugfix: non-defined variables in `defaultValue` now correctly resolve to `null`, and options and positional parameters are now correctly considered `required` only if their default value is `null` after variable interpolation. Thanks to [ifedorenko](https://github.com/ifedorenko) for raising this. - [#682] Bugfix: incorrect evaluation for multiple occurrences of a variable. - [#679] Documentation: Update examples for new execute API. Add examples for exit code control and custom exception handlers. diff --git a/picocli-jpms-module/build.gradle b/picocli-jpms-module/build.gradle index 33414d1f4..f9c7fb4b8 100644 --- a/picocli-jpms-module/build.gradle +++ b/picocli-jpms-module/build.gradle @@ -27,18 +27,19 @@ ext.moduleName = 'info.picocli' sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 -task copyRootProjectCode(type: Copy) { - from("${rootProject.projectDir}/src/main/java"){ - exclude '**/groovy' - } - into "${projectDir}/src/main/java" +dependencies { + compile rootProject + compile project(':picocli-codegen') } -task cleanupRootProjectCode(type: Delete) { - delete "${projectDir}/src/main/java/picocli" - delete fileTree("${projectDir}/src/main/java") { - exclude '**/module-info.java' + +task copyRootProjectClasses(dependsOn: classes, type: Copy) { + from("${rootProject.buildDir}/classes/java/main") { + exclude '**/groovy' } + from("${rootProject.buildDir}/resources/main") + into "${buildDir}/classes/java/main" } +jar.dependsOn(copyRootProjectClasses) compileJava { inputs.property("moduleName", moduleName) @@ -51,10 +52,6 @@ compileJava { classpath = files() } } -compileJava.dependsOn(copyRootProjectCode) -assemble.finalizedBy(cleanupRootProjectCode) -clean.finalizedBy(cleanupRootProjectCode) - test { // Excluding unit tests, should have been generated already with the root project. @@ -71,8 +68,7 @@ jar { 'Implementation-Version': version, 'Main-Class' : 'picocli.AutoComplete' } - baseName = project.name + '-all' - from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } + multiRelease = false }