2.3.2 Mar 2024 Support for add-opens and add-exports
This will assist users migrating to JDK17 and beyond, as they will sometimes be impacted by stricter Java modularization enforcement.
The JDK has two mechanisms for loosening those restrictions described here:
- add-exports
- add-opens
For example: To add add-opens and add-exports for a springboot target.
springboot(
name = "ordering-service",
boot_app_class = "com.salesforce.services.ordering.OrderingService",
java_library = ":base_lib",
bazelrun_addopens = ["java.management/sun.management=ALL-UNNAMED"],
bazelrun_addexports = ["java.base/java.base=ALL-UNNAMED"],
)
To use this new release, add this section to your WORKSPACE file:
http_archive(
name = "rules_spring",
sha256 = "87b337f95f9c09a2e5875f0bca533b050c9ccb8b0d2c92915e290520b79d0912",
urls = [
"https://github.com/salesforce/rules_spring/releases/download/2.3.2/rules-spring-2.3.2.zip",
],
)