Skip to content

Commit

Permalink
[#1610] Make picocli-shell-jline2 a named JPMS module with a `modul…
Browse files Browse the repository at this point in the history
…e-info.class`

Closes #1610
  • Loading branch information
remkop committed Feb 26, 2022
1 parent 18f7451 commit e91ae6e
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Picocli 4.7.0 introduced a `sortSynopsis = false` attribute to let the synopsis
## <a name="4.7.0-fixes"></a> Fixed issues
* [#1599] API: The `picocli-codegen` artifact is now a named JPMS module with a `module-info.class`.
* [#1611] API: The `picocli-groovy` artifact is now a named JPMS module with a `module-info.class`.
* [#1610] API: The `picocli-shell-jline2` is now a named JPMS module with a `module-info.class`.
* [#1600] API: Add `requires static java.sql` to picocli `module-info`.
* [#1471] API: Provide a programmatic way to configure Picocli's `TraceLevel`. Thanks to [ekinano](https://github.com/ekinano) for raising this.
* [#1125] API: Add parser configuration to allow options to consume values that match subcommand names or option names.
Expand Down
4 changes: 2 additions & 2 deletions picocli-shell-jline2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
group 'info.picocli'
description 'Picocli Shell JLine2 - easily build interactive shell applications with JLine 2 and picocli.'
version "$projectVersion"
ext.moduleName = 'info.picocli.shell.jline2'

dependencies {
api rootProject
Expand All @@ -18,8 +19,7 @@ jar {
'Specification-Version' : archiveVersion.get(),
'Implementation-Title' : 'Picocli Shell JLine2',
'Implementation-Vendor' : 'Remko Popma',
'Implementation-Version': archiveVersion.get(),
'Automatic-Module-Name' : 'info.picocli.shell.jline2'
'Implementation-Version': archiveVersion.get()
}
}

Expand Down
38 changes: 38 additions & 0 deletions picocli-shell-jline2/src/main/java9/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
Copyright 2017 Remko Popma
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// When compiling in Gradle, the org.beryx.jar plugin will be able to
// compile this file even with Java versions 8 or older.

// Your IDE may complain that "Modules are not supported at language level '5'",
// and javac may give an error: "java: class, interface or enum expected".
// To resolve this, exclude the 'java9' folder from the sources.
// IntelliJ IDEA:
// File > Project Structure... > Modules > picocli_main > Sources:
// select the 'java9' folder and click 'Mark as: Excluded'.

/**
* Defines picocli-based implementations of JLine 2 APIs
* for building interactive command line (REPL) applications.
*
* @since 4.7.0
*/
module info.picocli.shell.jline2 {
requires info.picocli;
requires jline;

exports picocli.shell.jline2;
}

0 comments on commit e91ae6e

Please sign in to comment.