Skip to content

Commit f31ef70

Browse files
committed
Add more information to README
1 parent d934076 commit f31ef70

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Extra Java Module Info Gradle Plugin - Changelog
2+
3+
## Versions 0.1 - 0.7
4+
* Initial features added

README.MD

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ To manage the versions of Java Modules, the plugin conveniently integrates with
1010
[Dependency Versions Constraints](https://docs.gradle.org/current/userguide/dependency_constraints.html#sec:adding-constraints-transitive-deps) in general
1111
as well as [Version Catalogs](https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog).
1212

13+
There is a [CHANGELOG.md](CHANGELOG.md).
14+
1315
# How to use?
1416

1517
Dor a quick start, you can find some samples here:
@@ -186,7 +188,6 @@ org_slf4j = "1.7.36"
186188
org_slf4j_simple = "1.7.36"
187189
```
188190

189-
190191
## Analyze Module Paths
191192

192193
You can use the `analyzeModulePath` help task to analyse the Module Paths of a project.
@@ -227,6 +228,31 @@ Notes / Options:
227228
- Patch legacy Jars to Modules: https://github.com/jjohannes/extra-java-module-info
228229
```
229230

231+
## Migrate existing Java projects to Java Modules
232+
233+
The plugin provides a `generateAllModuleInfoFiles` task for each project that applies it.
234+
You can use that to generate an initial `module-info.java` from the dependencies declared in Gradle.
235+
This is not a sophisticated migration tool, but useful, in combination with `analyzeModulePath`, to explore what it would take to migrate an existing project to Modules.
236+
237+
238+
## Integration with the Extra Java Module Info plugin
239+
240+
This plugin integrates with the [Extra Java Module Info](https://github.com/jjohannes/extra-java-module-info) plugin if both are applied.
241+
Module Name mappings for Jars that were patched with extra module info will be automatically registered.
242+
243+
```
244+
plugins {
245+
id("de.jjohannes.extra-java-module-info")
246+
id("de.jjohannes.java-module-dependencies")
247+
}
248+
249+
extraJavaModuleInfo {
250+
automaticModule("org.apache.commons:commons-math3", "commons.math3")
251+
// Module Dependencies plugin automatically knows that
252+
// 'commons.math3' now maps to 'org.apache.commons:commons-math3'
253+
}
254+
```
255+
230256
## Using Gradle's configuration cache (Gradle 7.4+)
231257

232258
This plugin reads all your `module-info.java` files during build configuration.

0 commit comments

Comments
 (0)