Skip to content

Commit

Permalink
[#1608] Make picocli-spring-boot-starter a named JPMS module with a…
Browse files Browse the repository at this point in the history
… `module-info.class`

Closes #1608
  • Loading branch information
remkop committed Feb 26, 2022
1 parent fcdc76e commit ccfcad1
Show file tree
Hide file tree
Showing 3 changed files with 46 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 @@ -78,6 +78,7 @@ Picocli 4.7.0 introduced a `sortSynopsis = false` attribute to let the synopsis
* [#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`.
* [#1608] API: The `picocli-spring-boot-starter` is now a named JPMS module with a `module-info.class`. NOTE: its module name changed to `info.picocli.spring.boot` from `info.picocli.spring`.
* [#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
6 changes: 4 additions & 2 deletions picocli-spring-boot-starter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ plugins {
group 'info.picocli'
description 'Picocli Spring Boot Starter - Enables Spring Dependency Injection and Spring Boot AutoConfiguration in Picocli Commands.'
version "$projectVersion"
ext.moduleName = 'info.picocli.spring.boot'

sourceCompatibility = 1.8
targetCompatibility = 1.8

Expand All @@ -22,8 +24,8 @@ jar {
'Specification-Version' : archiveVersion.get(),
'Implementation-Title' : 'Picocli Spring Boot Starter',
'Implementation-Vendor' : 'Remko Popma',
'Implementation-Version': archiveVersion.get(),
'Automatic-Module-Name' : 'info.picocli.spring'
'Implementation-Version': archiveVersion.get()
// 'Automatic-Module-Name' : 'info.picocli.spring'
}
}

Expand Down
41 changes: 41 additions & 0 deletions picocli-spring-boot-starter/src/main/java9/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
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 Spring-based implementations of picocli APIs and picocli-based implementations
* of Spring APIs for integrating picocli with Spring Boot and Spring Boot AutoConfiguration.
*
* @since 4.7.0
*/
module info.picocli.spring.boot {
requires info.picocli;
requires java.logging;
requires spring.boot;
requires spring.boot.autoconfigure;

exports picocli.spring;
exports picocli.spring.boot.autoconfigure;
}

0 comments on commit ccfcad1

Please sign in to comment.