alexfacciorusso
10/26/2022, 1:21 PMpackageDmg
also uses proguard, when it isn’t supposed to as per documentation, and also disabling obfuscation via the buildTypes.release.proguard.obfuscate = false
still runs proguard. Very strange.
Any ideas?
This is the error I get:alexfacciorusso
10/26/2022, 1:22 PMalexfacciorusso
10/26/2022, 1:25 PMbuildTypes.release.proguard.isEnabled.set(false)
but still I would like to solve the problem at the base (via a proguard configuration)alexey.tsvetkov
10/26/2022, 3:35 PMThat, and also theAre you sure? By default, the Gradle plugin creates two separate task groups: one is the default one (also uses proguard, when it isn’t supposed to as per documentationpackageDmg
buildTypes.default
, which corresponds to`packageDmg`, runDistributable
, etc). The other is the release one (buildTypes.release
, which corresponds to packageReleaseDmg
, runReleaseDistributable
, etc). Only release packaging tasks run ProGuard by default.
I’ve just checked that, on a sample project. All in all, packageDmg
is not expected to be influenced by buildTypes.release
settings.
Can you share a reproducer project or at least a gradle script and proguard settings file?alexfacciorusso
10/26/2022, 3:41 PMpackageDmg
I was then still using by my mistake the files in the binaries/main-release
directory instead than the ones in binaries/main
, so I can confirm that it is working as expectedalexfacciorusso
10/26/2022, 3:41 PMalexey.tsvetkov
10/26/2022, 3:42 PMalexfacciorusso
10/26/2022, 3:42 PMalexey.tsvetkov
10/26/2022, 3:45 PMrunReleaseDistributable
before packaging. It runs pre-packaged application just as it would run after installation.alexey.tsvetkov
10/26/2022, 3:46 PMrunReleaseDistributable
is just faster, than running packageReleaseDmg
, then installing the dmg, then running the installed app.alexfacciorusso
10/26/2022, 3:50 PMalexfacciorusso
10/26/2022, 3:50 PMalexey.tsvetkov
10/26/2022, 4:06 PMit still generates the dmg or msiIt does not package the dmg, but uses the same content. The whole pipeline works like this:
createRuntimeImage
(uses jlink to create minified JDK image) <- createDistributable
(creates an application image: bundles JDK and jars together).
Then runDistributable
runs the application image created by createDistributable
,
whereas `packageDmg`/`packageMsi` packages the same image into an installer.alexfacciorusso
10/26/2022, 4:37 PM