Skip to content

Commit

Permalink
[#674] JPMS module: move module-info.class to root of jar.
Browse files Browse the repository at this point in the history
Closes #674
  • Loading branch information
remkop committed May 9, 2019
1 parent d7a035f commit 8896d2c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:/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:/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.
Expand Down
26 changes: 11 additions & 15 deletions picocli-jpms-module/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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.
Expand All @@ -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
}


Expand Down

0 comments on commit 8896d2c

Please sign in to comment.