Add setting to remove the "jar" option in the gradle command#2710
Add setting to remove the "jar" option in the gradle command#2710LyzardKing wants to merge 5 commits into
Conversation
This is needed to build using the new java11 module launcher
sergiusens
left a comment
There was a problem hiding this comment.
This is a good start, thanks.
would you mind adding some unit tests (tests/unit/plugins/test_gradle.py) and a spread test (tests/spread/plugins/gradle)
fix missing [] in gradle plugin
|
@sergiusens I added a single unit test to verify if setting the option to false actually removes the jar parameter...Is it enough? |
|
For the spread tests, is it cheating if I developed a test in which I have a bash script that prints hello gradle, and use the gradle copy method to simply copy that (so I don't need the "jar", but I'm not technically compiling java...) |
|
@sergiusens I assume I have to sign the CLA, since it's my first contribution to a canonical project... |
|
@sergiusens This plugin change is needed to enable the jlink java builds, which are bundles (folders) Locally I added the same condition build-jre to not automatically add the openjdk-jre as a stage-package if it's set as true(like the default) but it could be set as a different option (something like no_system_jvm?) I changed the spread test to actually compile a jlink java hello world...and it works with the changes I made.. EDIT: the flag to disable adding the jre as a stage package could be stage_latest_jre, set to true by default. |
This is mainly used for modular/packaged jlink builds These include the needed java libs from the build system so copy the ubuntu libraries already.
|
This has been superseded by packaging the snap, but it might be useful for other applications using gradle without building jar files. |
This is needed to build using the new java11 module launcher
Is it something that can be included in snapcraft?
I've made the default to be as it is now, so nothing has to be changed.
At the moment I've added a "custom plugin" in the project I need this in (JabRef/jabref#5305)
The static tests are succesful in the test environment.
The other tests are having issues mainly because of my internet connection.
I'm running them again...
./runtests.sh static?./runtests.sh tests/unit?