Browse Source

Option to pack jars as uber JAR. Docs

ok/upd_versions_in_jetsnack
badmannersteam 10 months ago committed by Igor Demin
parent
commit
034c34dede
  1. 31
      tutorials/Native_distributions_and_local_execution/README.md

31
tutorials/Native_distributions_and_local_execution/README.md

@ -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: The Gradle plugin provides a *release* task for each corresponding *default* packaging task:
Default task (w/o ProGuard)| Release task (w. ProGuard) |Description Default task (w/o ProGuard) | Release task (w. ProGuard) | Description
---------------------------|----------------------------------|----------- -----------------------------------|------------------------------------------|--------------------------------------------------------------------------
`createDistributable` | `createReleaseDistributable` |Creates an application image with bundled JDK & resources `createDistributable` | `createReleaseDistributable` | Creates an application image with bundled JDK & resources
`runDistributable` | `runReleaseDistributable` |Runs 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 `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 `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 `packageDistributionForCurrentOS` | `packageReleaseDistributionForCurrentOS` | 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) `packageUberJarForCurrentOS` | `packageReleaseUberJarForCurrentOS` | Packages an application image into an uber (fat) JAR
`checkNotarizationStatus` | `checkReleaseNotarizationStatus` |Checks if notarization succeeded (macOS only) `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: The default configuration adds a few ProGuard rules:
* an application image is minified, i.e. non-used classes are removed; * 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)
}
}
}
```

Loading…
Cancel
Save