[bisq-network/bisq] Support building and running on Apple M1 Silicon (PR #5835)

Chris Beams notifications at github.com
Tue Nov 16 13:13:10 CET 2021


## Summary

Problem: Prior to this commit, it was not possible to build or run the desktop app on Apple's M1 (macos aarch64) architecture.

Solution: This commit makes all the changes necessary to successfully build and run on M1, but some of these changes require depending on snapshots and forks of certain dependencies, so this commit shouldn't be merged to master until those fixes are officially released. The changes made here include:

1. Upgrading from JavaFX 16 to JavaFX 17. JavaFX 17 was the first release to support aarch64 binaries, and so it's required.

2. Upgrading to a version of the openjfx-gradle-plugin that contains the fix at openjfx/javafx-gradle-plugin#113 to download the correct aarch64-classified JavaFX 17 jars. NOTE: at the time of this commit, the fix has not been released, so we are now depending on a locally-built SNAPSHOT resolved from `mavenLocal()`.

3. Upgrading to a version of the JFoenix library that includes a fix for the bug documented at sshahine/JFoenix#1187. At the time of this commit, this fix has only been published in the 'rationalityfrontline' fork of JFoenix, and so we've temporarily updated our dependency to point to that artifact. It appears that a new version of JFoenix is being developed that will contain this fix, but it hasn't shipped yet.

## Notes

 - Gradle dependency verification metadata has been updated to reflect the changes mentioned above, but will need further updates to capture the Linux, Windows and MacOS Intel variants of the JavaFX 17 binaries.

 - Building and testing has been verified to work on JDKs 11 through 17, however:

 - Running the desktop app only works on JDKs 11 through 15 until sshahine/JFoenix#1205 is fixed. Right now, attempting to run on JDK 16+ will result in a `Cannot invoke "javafx.scene.Node.getLayoutBounds()" because "this.textNode" is null` error. See the above mentioned issue for details.

 - It was necessary to bump the minimum supported source compatibility in the Gradle build from Java 10 to Java 11 in order to be able to consume the upgraded JFoenix artifact.

 - This PR builds on top of the #5824 and assumes it will be merged; only the latest commit in this PR (98dc483c10) should be considered by reviewers.

## TODO

(what remains in order to take this PR out of draft, review and merge it)

- [ ] sshahine/JFoenix#1205 to be fixed, released and upgraded to
- [ ] openjfx/javafx-gradle-plugin#113 to be released and upgraded to
- [ ] JavaFX 17 verification metadata to be updated for Linux, Windows and MacOS Intel architectures

You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/5835

-- Commit Summary --

  * Upgrade to Gradle 7.3
  * Migrate to Gradle's built-in dependency verification
  * Add verification metadata for linux-specific artifacts
  * Add verification metadata for MacOS x86 artifacts
  * Upgrade Lombok to support JDK16+
  * Upgrade Mockito to 4.0.0
  * Disable verification for javadoc and source jars
  * Organize dependency entries
  * Add missing dependency verification entries
  * Add missing verification metadata
  * Adapt Gradle startScript customization logic
  * Add Windows artifact hashes
  * Set pricenode mainClassName explicitly
  * Support building and running on Apple M1 Silicon

-- File Changes --

    M build.gradle (548)
    M core/src/test/java/bisq/core/payment/ReceiptValidatorTest.java (2)
    A gradle/verification-metadata.xml (2751)
    D gradle/witness/gradle-witness.gradle (89)
    D gradle/witness/gradle-witness.jar (0)
    M gradle/wrapper/gradle-wrapper.properties (3)
    M pricenode/README.md (1)
    D pricenode/src/main/java/bisq/price/util/VersionController.java (55)
    D pricenode/src/test/java/bisq/price/util/VersionControllerTest.java (21)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/5835.patch
https://github.com/bisq-network/bisq/pull/5835.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/5835
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20211116/c40982eb/attachment.htm>


More information about the bisq-github mailing list