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
Introduce Java 9 module compatibility #5543
Conversation
Motivation: Some users are having issues with using Armeria as a Java 9 module because: - Armeria core JAR contains `module-info.class` from Bouncy Castle, which should be removed during the shading process. - Armeria doesn't define module metadata at all Modifications: - Updated `gradle-scripts` to exclude `module-info.class` while shading. - This removes Bouncy Castle's `module-info.class` from the final JAR, fixing the issue mentioned in the previous section. - Updated `gradle-scripts` to auto-inject the `Automatic-Module-Name` property into `META-INF/MANIFEST.MF` so that JVM auto-generates the module metadata. - Miscellaneous: - Overwrote the `Created-By` property in `META-INF/MANIFEST.MF` so that the manifest file's content doesn't change depending on JDK version. Result: - (new feature) Armeria JARs are now Java modules.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5543 +/- ##
============================================
+ Coverage 74.04% 74.07% +0.02%
- Complexity 20871 20901 +30
============================================
Files 1809 1809
Lines 76857 76940 +83
Branches 9809 9833 +24
============================================
+ Hits 56912 56994 +82
+ Misses 15304 15297 -7
- Partials 4641 4649 +8 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 👍 👍
Co-authored-by: minux <songmw725@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked that Automatic-Module-Name
is set for output jars 👍 Thanks @trustin 🙇 👍 🙇
Motivation:
Some users are having issues with using Armeria as a Java 9 module because:
module-info.class
from Bouncy Castle, which should be removed during the shading process.Modifications:
gradle-scripts
to excludemodule-info.class
while shading.module-info.class
from the final JAR, fixing the issue mentioned in the previous section.gradle-scripts
to auto-inject theAutomatic-Module-Name
property intoMETA-INF/MANIFEST.MF
so that JVM auto-generates the module metadata.Created-By
property inMETA-INF/MANIFEST.MF
so that the manifest file's content doesn't change depending on JDK version.Result: