You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+78-7Lines changed: 78 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
6
6
A Gradle plugin to package modular Java application as standalone bundles/installers for Windows, macOS and Linux with [jpackage](https://docs.oracle.com/en/java/javase/21/docs/specs/man/jpackage.html).
7
7
8
-
This plugin is maintained by me, [Jendrik Johannes](https://github.com/jjohannes).
8
+
This [GradleX](https://gradlex.org)plugin is maintained by me, [Jendrik Johannes](https://github.com/jjohannes).
9
9
I offer consulting and training for Gradle and/or the Java Module System - please [reach out](mailto:[email protected]) if you are interested.
10
10
There is also my [YouTube channel](https://www.youtube.com/playlist?list=PLWQK2ZdV4Yl2k2OmC_gsjDpdIBTN0qqkE) on Gradle topics.
11
11
@@ -17,16 +17,15 @@ If you plan to build Java Modules with Gradle, you should consider using these p
Package standalone applications for Windows, macOS and Linux
26
28
27
-
[Here is a sample](https://github.com/gradlex-org/java-module-testing/tree/main/samples/use-all-java-module-plugins)
28
-
that shows all plugins in combination.
29
-
30
29
[In episodes 31, 32, 33 of Understanding Gradle](https://github.com/jjohannes/understanding-gradle) I explain what these plugins do and why they are needed.
@@ -37,6 +36,10 @@ that shows all plugins in combination.
37
36
38
37
# How to use?
39
38
39
+
Working example projects to inspect:
40
+
-[java-module-system](https://github.com/jjohannes/java-module-system) contains a compact sample and further documentation
41
+
-[gradle-project-setup-howto](https://github.com/jjohannes/gradle-project-setup-howto/tree/java_module_system) is a full-fledged Java Module System project setup
42
+
40
43
For general information about how to structure Gradle builds and apply community plugins like this one to all subprojects
41
44
you can check out my [Understanding Gradle video series](https://www.youtube.com/playlist?list=PLWQK2ZdV4Yl2k2OmC_gsjDpdIBTN0qqkE).
42
45
@@ -80,18 +83,86 @@ javaModulePackaging {
80
83
}
81
84
```
82
85
83
-
## How ot use?
84
-
85
-
You can now run _target_ specific builds:
86
+
You can now run _target-specific_ builds:
86
87
87
88
```
88
89
./gradlew assembleWindows
89
90
```
90
91
92
+
```
93
+
./gradlew runWindows
94
+
```
95
+
91
96
## Using target specific variants of libraries (like JavaFX)
92
97
98
+
The plugin uses Gradle's [variant-aware dependency management](https://docs.gradle.org/current/userguide/variant_model.html)
99
+
to select target-specific Jars based on the configured [targets](#apply-and-use-the-plugin).
100
+
For this, such a library needs to be published with [Gradle Module Metadata](https://docs.gradle.org/current/userguide/publishing_gradle_module_metadata.html)
101
+
and contain the necessary information about the available target-specific Jars.
102
+
If the metadata is missing or incomplete, you should use the [org.gradlex.jvm-dependency-conflict-resolution](https://github.com/gradlex-org/jvm-dependency-conflict-resolution)
103
+
plugin to add the missing information via [addTargetPlatformVariant](https://gradlex.org/jvm-dependency-conflict-resolution/#patch-dsl-block).
0 commit comments