Skip to content

Commit

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

Closes #1609
  • Loading branch information
remkop committed Feb 26, 2022
1 parent e91ae6e commit fcdc76e
Show file tree
Hide file tree
Showing 3 changed files with 42 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 @@ -77,6 +77,7 @@ Picocli 4.7.0 introduced a `sortSynopsis = false` attribute to let the synopsis
* [#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`.
* [#1609] API: The `picocli-shell-jline3` 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
5 changes: 3 additions & 2 deletions picocli-shell-jline3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ plugins {
group 'info.picocli'
description 'Picocli Shell JLine3 - easily build interactive shell applications with JLine 3 and picocli.'
version "$projectVersion"
ext.moduleName = 'info.picocli.shell.jline3'

sourceCompatibility = 1.8
targetCompatibility = 1.8

Expand All @@ -20,8 +22,7 @@ jar {
'Specification-Version' : archiveVersion.get(),
'Implementation-Title' : 'Picocli Shell JLine3',
'Implementation-Vendor' : 'Remko Popma',
'Implementation-Version': archiveVersion.get(),
'Automatic-Module-Name' : 'info.picocli.shell.jline3'
'Implementation-Version': archiveVersion.get()
}
}

Expand Down
38 changes: 38 additions & 0 deletions picocli-shell-jline3/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 3 APIs
* for building interactive command line (REPL) applications.
*
* @since 4.7.0
*/
module info.picocli.shell.jline3 {
requires info.picocli;
requires org.jline;

exports picocli.shell.jline3;
}

0 comments on commit fcdc76e

Please sign in to comment.