Skip to content

Commit 114a3e6

Browse files
committed
Add docs and update changelog
1 parent c44a4dd commit 114a3e6

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Extra Java Module Info Gradle Plugin - Changelog
22

3+
## Version 1.11
4+
* [New] [#161](https://github.com/gradlex-org/extra-java-module-info/pull/161) - Add 'skipLocalJars' option
5+
* [New] [#106](https://github.com/gradlex-org/extra-java-module-info/pull/106) - Actionable error message when plugin is used at configuration time
6+
37
## Version 1.10.1
48
* [Fix] [#164](https://github.com/gradlex-org/extra-java-module-info/pull/164) - fix: 'preserveExisting' does not duplicate 'provides' entries
59

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ plugins {
6767
6868
// add module information for all direct and transitive dependencies that are not modules
6969
extraJavaModuleInfo {
70-
// failOnMissingModuleInfo.set(false)
70+
// failOnMissingModuleInfo = false
71+
// failOnAutomaticModules = true
72+
// skipLocalJars = true
7173
module("commons-beanutils:commons-beanutils", "org.apache.commons.beanutils") {
7274
exports("org.apache.commons.beanutils")
7375
// or granuarly allowing access to a package by specific modules
@@ -164,6 +166,13 @@ sourceSets.all {
164166
}
165167
```
166168

169+
## How do I deactivate the plugin functionality for my own Jars?
170+
171+
A major use case of the plugin is to transform Jars from 3rd party repositories that you do not control.
172+
By default, however, the plugin looks at all Jars on the module paths – including the Jars Gradle builds from you own modules.
173+
This is working well in most cases. The jars are analyzed and the plugin detects that they are infact modules and does not modify them.
174+
You can still optimize the plugin execution to completely skip analysis of locally built Jars by setting `skipLocalJars = true`.
175+
167176
## How do I add `provides ... with ...` declarations to the `module-info.class` descriptor?
168177

169178
The plugin will automatically retrofit all the available `META-INF/services/*` descriptors into `module-info.class` for you. The `META-INF/services/*` descriptors will be preserved so that a transformed JAR will continue to work if it is placed on the classpath.
@@ -263,15 +272,15 @@ The plugin provides a set of `<sourceSet>moduleDescriptorRecommendations` tasks
263272

264273
This task generates module info spec for the JARs that do not contain the proper `module-info.class` descriptors.
265274

266-
NOTE: This functionality requires Gradle to be run with Java 11+ and failing on missing module information should be disabled via `failOnMissingModuleInfo.set(false)`.
275+
NOTE: This functionality requires Gradle to be run with Java 11+ and failing on missing module information should be disabled via `failOnMissingModuleInfo = false`.
267276

268277
## How can I ensure there are no automatic modules in my dependency graph?
269278

270279
If your goal is to fully modularize your application, you should enable the following configuration setting, which is disabled by default.
271280

272281
```
273282
extraJavaModuleInfo {
274-
failOnAutomaticModules.set(true)
283+
failOnAutomaticModules = true
275284
}
276285
```
277286

@@ -282,7 +291,7 @@ dependencies {
282291
implementation("org.yaml:snakeyaml:1.33")
283292
}
284293
extraJavaModuleInfo {
285-
failOnAutomaticModules.set(true)
294+
failOnAutomaticModules = true
286295
module("org.yaml:snakeyaml", "org.yaml.snakeyaml") {
287296
closeModule()
288297
exports("org.yaml.snakeyaml")
@@ -351,7 +360,7 @@ However, if you get started and just want things to be put on the Module Path, y
351360

352361
```
353362
extraJavaModuleInfo {
354-
deriveAutomaticModuleNamesFromFileNames.set(true)
363+
deriveAutomaticModuleNamesFromFileNames = true
355364
}
356365
```
357366

0 commit comments

Comments
 (0)