Closed Parth closed 5 years ago
I can also update the docs to reflect what the installerType
options are
Thanks @Parth, a PR would be much appreciated!
Could you give me some guidance on how local development works for a gradle plugin like this one?
Another thing I'm interested in PR'ing is: exposing the --icon
flag for the jpackageImage
task (and other similar ones). Thoughts on that?
1.
After making changes to the plugin code, run:
./gradlew test
to check that everything still works.
Ideally, we should have tests for all use cases, but it is quite difficult to provide automated tests for the jpackage task and ensure that these tests also work in Travis. So, for the moment jpackage-related fixes are manually tested.
I added the maven-publish plugin to build.gradle, in order to make testing easier. After executing:
./gradlew publishToMavenLocal
the plugin will be available in your local Maven repository.
After that, you can use it in a test project (this can be one of your own projects or one of the example projects).
In the settings.gradle of your test project insert:
pluginManagement {
repositories {
mavenLocal()
gradlePluginPortal()
}
}
Then, in build.gradle configure the version of the plugin available in your local Maven repository. For example:
plugins {
id 'org.beryx.runtime' version '1.3.1-SNAPSHOT'
....
}
2.
Right now, imageOptions
can be used to pass additional options to jpackage:
runtime {
jpackage {
imageOptions = ['--icon', 'src/main/resources/java.ico']
...
}
...
}
A dedicated plugin option for setting the icon is certainly a nice to have feature. I didn't expose the --icon flag and other ones as plugin options because jpackage has quite a few of them and they sometimes changed between jpackage releases (because jpackage is still early-access). I thought that exposing only a subset of the available flags will rather confuse the users, so I stuck with imageOptions
as the only mechanism to pass options to jpackage.
The same bug existed in the badass-jlink-plugin -- see https://github.com/beryx/badass-jlink-plugin/issues/75 -- and was fixed by https://github.com/beryx/badass-jlink-plugin/commit/3376032f2754662cfff469425f8fc2fb7a525c1f.
@Parth Are you going to submit a PR soon? If not I can do it as I'd like to see this fixed.
Go for it @msgilligan, I'll make PR's for some doc improvements instead
See PR #16!
Thanks, @msgilligan! Your PR is included in release 1.3.1.
this code
sets up the wrong defaults. I believe the last two clauses should be switched.
pkg
,dmg
belong tomacOs
.would be happy to PR over the weekend if I'm right.