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

secp-api/secp-bouncy: backport to Java 8 #140

Merged
merged 1 commit into from
Feb 27, 2025

Conversation

msgilligan
Copy link
Member

@msgilligan msgilligan commented Feb 26, 2025

This PR means that released jars for the API and the Bouncy Castle implementation will be Java 8-compatible, but will still have module-info records in them. The secp-ffm module will remain at JDK 23+.

  • IDEs will see modules as Java 9
  • apiModuleJavaCompatibility property is used with org.beryx.jar Gradle plugin to create Java 8 JARs with module-info on official builds
  • Remove all usages of Java 9 API

Developers of secp-jdk using IDEs will need to be aware that the actual requirements are Java 8 API. But mistakes will be caught by CI.

@msgilligan msgilligan added this to the Version 0.0.3 milestone Feb 26, 2025
@msgilligan msgilligan force-pushed the msgilligan/api-bouncy-java-8 branch from 5336a79 to 8d68d1d Compare February 26, 2025 20:45
@msgilligan msgilligan requested a review from craigraw February 26, 2025 20:45
@msgilligan
Copy link
Member Author

If this is approved/merged, I plan to backport it to the 0.0.2 branch before releasing it. @schildbach This should allow us to start experimental refactoring of bitcoinj-core to the secp-api and a branch without any JDK version changes.

@msgilligan msgilligan force-pushed the msgilligan/api-bouncy-java-8 branch from 8d68d1d to 52b3e2c Compare February 27, 2025 00:27
@msgilligan
Copy link
Member Author

@craigraw This shouldn't affect you, but I thought you might be interested and you also have experience with modules so maybe you might have an idea for improvement.

Copy link
Collaborator

@craigraw craigraw left a comment

Choose a reason for hiding this comment

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

I don't have much experience with multi-release jars, but I'm certainly in favour of modular support by default.

Copy link
Member

@schildbach schildbach left a comment

Choose a reason for hiding this comment

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

Looks good! Being Java 8 compatible certainly makes it easier for us.

* IDEs will see secp-api, secp-bouncy modules as Java 9
* apiModuleJavaCompatibility property is used with `org.beryx.jar` Gradle
  plugin to create Java 8 JARs with module-info on official builds
* Remove usages of Java 9 API in secp-api and secp-bouncy

Developers of secp-jdk using IDEs will need to be aware that the
actual requirements are Java 8 API. But mistakes will be caught by
CI.
@msgilligan msgilligan force-pushed the msgilligan/api-bouncy-java-8 branch from 52b3e2c to de600d7 Compare February 27, 2025 10:14
@msgilligan
Copy link
Member Author

I don't have much experience with multi-release jars, but I'm certainly in favour of modular support by default.

Technically they aren't multi-release jars. They're just Java 8 JARs with module-info entries. This approach works well and is used by several standard (Jakarta) libraries.

@msgilligan msgilligan merged commit 2afefa0 into master Feb 27, 2025
14 checks passed
@msgilligan msgilligan deleted the msgilligan/api-bouncy-java-8 branch February 27, 2025 10:25
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.

3 participants