Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Java to v11 and JavaFX to v15 #5431

Merged
merged 86 commits into from
Apr 22, 2021

Conversation

ripcurlx
Copy link
Contributor

No description provided.

cd2357 and others added 30 commits September 16, 2020 09:15
Update the gradle dependency to JavaFX 14.

This brings to Bisq the latest JavaFX fixes and improvements, especially
 in the areas of UI performance, memory management and security.

JavaFX can be upgraded independently of the JDK used to build the
application, so this change is modular and does not affect other parts
of the build process.

Related / likely related to: bisq-network#350 bisq-network#2135 bisq-network#2509 bisq-network#3128 bisq-network#3307 bisq-network#3308 bisq-network#3343
bisq-network#3430 bisq-network#3657 bisq-network#3677 bisq-network#3683 bisq-network#3686 bisq-network#3786 bisq-network#3787 bisq-network#3892 bisq-network#3917 bisq-network#3918 bisq-network#3936
Use java 14 to build the necessary artifacts. This is the most recent
version which brings support for JavaFX 14, as well as a newer packager
tool to build native applications.
Use Gradle 6.3, which adds support for Java 14.
Use Lombok v1.18.12, which adds support for Java 14.
Use Mockito 3.3.0, which fixes some bugs that caused valid tests to fail
in the Java 14 environment.
Remove duplicate call to a stubbed method. This caused an
UnnecessaryStubbingException with Mockito's strict validation settings.
Split test into sub-tests in order to avoid mockito UnnecessaryStubbingExceptions. These exceptions occurred because of 3 ambiguous uses of "when().thenReturn()" in the same test. These calls were ambiguous, because the when() argument was identical and mockito did not check the thenReturn() arguments, which would have differentiated the calls. Splitting this test method into 4 test methods achieved this call differentiation.
Upgrade JavaFX to most recent release.
Upgraded Gradle to the latest version, which has better module-info support for the imported gradle dependencies.
Fix styling to match Codacy rules.
Fix styling to match Codacy rules.
Fix styling to match Codacy rules.
Fix styling to match Codacy rules.
Fix styling to match Codacy rules.
Updated the commons-lang3 version to the latest one, to avoid the existence of multiple versions used by different projects.

Before, v3.8 was used in most projects and v3.9 was brought as a transitive dependency in pricenode. So both were used by different projects. With this commit, all projects use v3.11, since it is explicitly defined in build.gradle.

This resolves an exception thrown by jdeps when trying to list the module dependencies of the desktop-vXYZ-SNAPSHOT-all.jar.
Fix styling to match Codacy rules.
Try out optional tag to check how it affects codacy behavior. [skip ci]
Include the application version number in the jar manifest. This makes it easier later on, in the packaging process, to programmatically retrieve the build version from a reliable source.
Extend the gradle script with tasks that use jpackage to generate Bisq binaries. The kind of binaries generated depend on the OS where this is executed.

The packaging of binaries can be started by calling:
./gradlew --console=plain packageInstallers
from the root project folder.
Update jfoenix to attempt to fix JavaFX NPEs.
Fix the logic used to determine the JDK 15 assets and download links. Pre-releases are now excluded, as well as openj9 binaries. The resulting assets are final releases of hotspot builds.
Update jpackage arguments such that a specific java version is packaged in the installers (in this case, v11).
The drawback of this is that the floating label on top of the
Field is not properly left aligned anymore.
A proper fix would mean more re-writing of the jFoenix library
which would make it harder and harder to maintain for applying
library updates.
Update build script to only build the dmg for macOS.
Fixed typo affecting jpackage option concatenation, where a missing "+" caused subsequent options to not be considered. Surround concatenated options with parentheses, to ensure such a typo in the future is marked as a syntax error, and therefore avoided.
Remove TODO, since previous argument concatenation fix addressed the issue (desktop and start menu shortcuts are created now).
Update macOS setup script to use the tiff image in the installer bundle, as this is the type of background image expected and included by jpackage.

Convert Bisq-background.png to Bisq-background.tiff using imagemagick.
Backport bisq-network#4600 into this PR.

Set `-Djdk.module.illegalAccess=deny` in order to reduce warning in startup logs.
Disable the java option because it causes issues in the resulting app if packaged with a recent Java Runtime (tested with Java 11, 14 and 15).
cd2357 and others added 19 commits February 1, 2021 18:41
Convert the fat jar into a deterministic one before it is packaged in the generated installers.
Store the SHA-256 of the deterministic jar next to the generated binaries.
Explicitly set the permissions on the generated exe binary, which are required by the signtool.
Surround entire command in quotes, to avoid issues with cmd parsing for a command with custom flags and space-containing arguments (full path of the exe arg).
Remove superfluous comments about the Windows setup.
Include a zip with the relevant libs for running on raspi. Place the zip in the generated binaries folder.
Needs to be either only executed on macOS or adapted to work with Windows as well
used for mobile notification pairing because of missing current macOS support by currently used webcam library
@ripcurlx ripcurlx mentioned this pull request Apr 22, 2021
@ripcurlx ripcurlx requested a review from sqrrm April 22, 2021 07:38
@ripcurlx ripcurlx added this to the v1.6.3 milestone Apr 22, 2021
Copy link
Member

@sqrrm sqrrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@sqrrm sqrrm merged commit 469448a into bisq-network:master Apr 22, 2021
@ripcurlx ripcurlx deleted the upgrade-javafax-14 branch July 16, 2021 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants