|
|
|
@ -596,15 +596,16 @@ that is developed by [Guardsquare](https://www.guardsquare.com/).
|
|
|
|
|
|
|
|
|
|
The Gradle plugin provides a *release* task for each corresponding *default* packaging task: |
|
|
|
|
|
|
|
|
|
Default task (w/o ProGuard)| Release task (w. ProGuard) |Description |
|
|
|
|
---------------------------|----------------------------------|----------- |
|
|
|
|
`createDistributable` | `createReleaseDistributable` |Creates an application image with bundled JDK & resources |
|
|
|
|
`runDistributable` | `runReleaseDistributable` |Runs an application image with bundled JDK & resources |
|
|
|
|
`run` | `runRelease` |Runs a non-packaged application `jar` using Gradle JDK |
|
|
|
|
`package<FORMAT_NAME>` | `packageRelease<FORMAT_NAME>` |Packages an application image into a `<FORMAT_NAME>` file |
|
|
|
|
`packageForCurrentOS` | `packageReleaseForCurrentOS` |Packages an application image into a format compatible with current OS |
|
|
|
|
`notarize<FORMAT_NAME>` | `notarizeRelease<FORMAT_NAME>` |Uploads a `<FORMAT_NAME>` application image for notarization (macOS only) |
|
|
|
|
`checkNotarizationStatus` | `checkReleaseNotarizationStatus` |Checks if notarization succeeded (macOS only) |
|
|
|
|
Default task (w/o ProGuard) | Release task (w. ProGuard) | Description |
|
|
|
|
-----------------------------------|------------------------------------------|-------------------------------------------------------------------------- |
|
|
|
|
`createDistributable` | `createReleaseDistributable` | Creates an application image with bundled JDK & resources |
|
|
|
|
`runDistributable` | `runReleaseDistributable` | Runs an application image with bundled JDK & resources |
|
|
|
|
`run` | `runRelease` | Runs a non-packaged application `jar` using Gradle JDK |
|
|
|
|
`package<FORMAT_NAME>` | `packageRelease<FORMAT_NAME>` | Packages an application image into a `<FORMAT_NAME>` file |
|
|
|
|
`packageDistributionForCurrentOS` | `packageReleaseDistributionForCurrentOS` | Packages an application image into a format compatible with current OS |
|
|
|
|
`packageUberJarForCurrentOS` | `packageReleaseUberJarForCurrentOS` | Packages an application image into an uber (fat) JAR |
|
|
|
|
`notarize<FORMAT_NAME>` | `notarizeRelease<FORMAT_NAME>` | Uploads a `<FORMAT_NAME>` application image for notarization (macOS only) |
|
|
|
|
`checkNotarizationStatus` | `checkReleaseNotarizationStatus` | Checks if notarization succeeded (macOS only) |
|
|
|
|
|
|
|
|
|
The default configuration adds a few ProGuard rules: |
|
|
|
|
* an application image is minified, i.e. non-used classes are removed; |
|
|
|
@ -650,3 +651,15 @@ compose.desktop {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
Joining to the uber JAR is disabled by default - ProGuard produces the corresponding JAR for every input JAR. |
|
|
|
|
To enable it, set the following property via Gradle DSL: |
|
|
|
|
``` |
|
|
|
|
compose.desktop { |
|
|
|
|
application { |
|
|
|
|
buildTypes.release.proguard { |
|
|
|
|
joinOutputJars.set(true) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
``` |
|
|
|
|