bisq-network / bisq2

GNU Affero General Public License v3.0
194 stars 68 forks source link

Use JRE for binaries instead of JDK #2681

Open HenrikJannsen opened 2 months ago

HenrikJannsen commented 2 months ago

Currently we package the same JDK version used for the build into the binaries. We should use the JRE (of same java and vendor version) instead to safe about 60 MB on file size.

The BisqToolchainResolver would need an extension to be used for the packager. The download path is exact the same just jdk will be jre.

The getJPackageJdkDirectory method in PackagingPlugin delivers the path for the runtime. This would require changes to support the JRE.

HenrikJannsen commented 2 months ago

@alvasw Do you see any issues with that? @rodvar Would you be interested to work on that?

rodvar commented 2 months ago

sure @HenrikJannsen I can have a look!

rodvar commented 2 months ago

starting work on this one

rodvar commented 2 months ago

@HenrikJannsen just did some initial tests, it looks like this is as easier as changing the urls to use jre instead of jdk. zulu doesn't have any specific subdirs for jre, so no need to change the Packaging plugin.

The download size is significant, but the final binaries doesn't get much of an improvement... shall I send a PR to discuss anyways?

rodvar commented 2 months ago

@HenrikJannsen just did some initial tests, it looks like this is as easier as changing the urls to use jre instead of jdk. zulu doesn't have any specific subdirs for jre, so no need to change the Packaging plugin.

The download size is significant, but the final binaries doesn't get much of an improvement... shall I send a PR to discuss anyways?

clarified the above on a matrix chat. We need to keep the JDK resolver as is, but the idea is to build a new JRE resolver and set it up in the jpackager to be used for binaries (as opposed to let it use the jdk bins as it is now

alejandrogarcia83 commented 1 month ago

I have to revert PR #2773 because the changes broke the release tasks. The release has been already delayed by more than a week and I don't want to delay the release further.

rodvar commented 1 month ago

Hi @alejandrogarcia83 , I'm surprised and sorry to hear that, saw you comment as well in https://github.com/bisq-network/bisq2/pull/2773#issuecomment-2407996717

Could you please be more specific, which release tasks were broken? Do you have any logs? I'm happy to give you a hand to fix this so we can include this substantial size improvement for the next release hopefully.