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
@@ -118,6 +126,10 @@ And execute the next command in project's root folder:
118
126
gradle packageMyApp
119
127
```
120
128
129
+
### Package your app via CI
130
+
131
+
-**GitHub:** You can find an example workflow file [here](https://github.com/fvarrui/JavaPackager/blob/pr-248/test/hello-world-maven/.github/workflows/package.yml).
132
+
121
133
### Generated artifacts
122
134
123
135
By default it will generate next artifacts in `${outputDirectory} ` folder:
@@ -161,21 +173,25 @@ By default it will generate next artifacts in `${outputDirectory} ` folder:
161
173
|`extra`|:x:|| Map with extra properties to be used in customized Velocity templates, accesible through `$info.extra` variable. |
162
174
|`fileAssociations`|:x:|[`FileAssociation[]`](https://github.com/fvarrui/JavaPackager/blob/master/src/main/java/io/github/fvarrui/javapackager/model/FileAssociation.java)| Associate file extensions or MIME types to the app. |
163
175
|`forceInstaller`|:x:|`false`| If `true`, skips operating system check when generating installers. |
176
+
|`nativeImage`|:x:|`false`| If `true`, generates a native image for the current operating system. Note that `jdkVendor` must be set to `graalvm` for this to work. |
177
+
|`sharedLibrary`|:x:|`false`| If `true`, generates a shared library for the current operating system. Note that `jdkVendor` must be set to `graalvm` for this to work. |
164
178
|`generateInstaller`|:x:|`true`| Generates an installer for the app. |
165
-
|`jdkPath`|:x:|`${java.home}`| JDK used to generate a customized JRE. It allows to bundle customized JREs for different platforms. |
179
+
|`jdkVersion`|:x:|`latest`| JDK version to download and use. The latest version is used by default. See all available versions here: [adoptium](https://api.adoptium.net/v3/info/available_releases). |
180
+
|`jdkVendor`|:x:|`graalvm`| JDK vendor to download the JDK from. Currently supported: `adoptium, graalvm`|
181
+
|`jdkPath`|:x:|`null`| If null downloads (if necessary and also updates it if needed) the right JDK for the selected platform and sets this value to `<temp-dir>/jdk/win` or `<temp-dir>/jdk/linux` or `<temp-dir>/jdk/mac`. The downloaded JDK will be used to generate a customized JRE. |
|`jreMinVersion`|:x:|| JRE minimum version. If an appropriate version cannot be found display error message. Disabled if a JRE is bundled. |
168
184
|`jrePath`|:x:|`""`| Path to JRE folder. If specified, it will bundle this JRE with the app, and won't generate a customized JRE. For Java 8 version or least. |
169
185
|`licenseFile`|:x:|`${project.licenses[0].url}` or `${basedir}/LICENSE` or `${projectdir}/LICENSE`| Path to project license file. |
170
186
|`mainClass`|:heavy_check_mark:|`${exec.mainClass}`| Full path to your app main class. |
171
187
|`manifest`|:x:||[Allows adding additional entries to MANIFEST.MF file.](docs/manifest.md)|
172
188
|`modules`|:x:|`[]`| Modules to customize the bundled JRE. Don't use `jdeps` to get module dependencies. |
173
-
|`name`|:x:|`${project.name}` or `${project.artifactId}`| App name. |
189
+
|`appName`|:x:|`${project.name}` or `${project.artifactId}`| App name. |
174
190
|`organizationName`|:x:|`${project.organization.name}` or `"ACME"`| Organization name. |
|`outputDirectory`|:x:|`${project.build.directory}` or `${project.builddir}`| Output directory (where the artifacts will be generated). |
178
-
|`packagingJdk`|:x:|`${java.home}`| JDK used in the execution of `jlink` and other JDK tools. |
194
+
|`packagingJdk`|:x:|`null` or same as `jdkPath`| JDK used in the execution of `jlink` and other JDK tools. If null `jdkPath` will be used.|
179
195
|`platform`|:x:|`auto`| Defines the target platform, which could be different to the execution platform. Possible values: `auto`, `mac`, `linux`, `windows`. Use `auto` for using execution platform as target. |
180
196
|`runnableJar`|:x:|| Defines your own JAR file to be bundled. If it's ommited, the plugin packages your code in a runnable JAR and bundle it with the app. |
181
197
|`scripts`|:x:|| Specify bootstrap script. **Pre and post-install scripts comming soon!**|
@@ -198,7 +214,7 @@ By default it will generate next artifacts in `${outputDirectory} ` folder:
198
214
199
215
### Plugin assets
200
216
201
-
Any [asset used by JavaPackager](https://github.com/fvarrui/JavaPackager/tree/master/src/main/resources), such as application icons or templates, can be replaced just by placing a file with the same name in `${assetsDir}` folder organized by platform.
217
+
Any [asset used by JavaPackager]([JavaPackager/src/main/resources at master · fvarrui/JavaPackager · GitHub](https://github.com/fvarrui/JavaPackager/tree/master/src/main/resources)), such as application icons or templates, can be replaced just by placing a file with the same name in `${assetsDir}` folder organized by platform.
description ='Hybrid Maven/Gradle plugin to package Java applications as native Windows, Mac OS X or GNU/Linux executables and create installers for them'
75
84
76
85
sourceCompatibility =JavaVersion.VERSION_1_8
@@ -86,6 +95,11 @@ publishing {
86
95
}
87
96
}
88
97
98
+
java {
99
+
withSourcesJar()
100
+
// and/or analogously use "withJavadocJar()" to get a "javadocJar" task
0 commit comments