-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix OSGi :mongodb-crypt
manifest entries
#1506
Fix OSGi :mongodb-crypt
manifest entries
#1506
Conversation
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.
Left a few comments for other reviewers.
@@ -89,7 +89,7 @@ afterEvaluate { | |||
'com.github.luben.zstd.*;resolution:=optional', | |||
'org.slf4j.*;resolution:=optional', | |||
'jnr.unixsocket.*;resolution:=optional', | |||
'com.mongodb.crypt.capi.*;resolution:=optional', |
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.
driver-core doesn't reference MongoCryptException
(the only class left in this package), so this needed to be removed or else we get a warning.
@@ -75,6 +75,7 @@ afterEvaluate { | |||
jar.manifest.attributes['Bundle-SymbolicName'] = 'org.mongodb.driver-reactivestreams' | |||
jar.manifest.attributes['Import-Package'] = [ | |||
'com.mongodb.crypt.capi.*;resolution:=optional', | |||
'com.mongodb.internal.crypt.capi.*;resolution:=optional', |
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.
reactive-streams (and sync) reference MongoCryptException
, and also the classes that were moved into the internal package, so both packages are now needed.
@@ -175,7 +175,7 @@ afterEvaluate { | |||
tasks.jar { | |||
manifest { | |||
attributes( | |||
"-exportcontents" to "com.mongodb.crypt.capi.*;-noimport:=true", | |||
"-exportcontents" to "com.mongodb.*;-noimport:=true", |
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.
This is a weird one. driver-core uses *
for this, but *
causes a warning with mongodb-crypt because the jar file contains directories for each of the shared library files, and some of those (e.g. linux-aarch64
) are not valid Java package names. Using com.mongodb.*
does the trick (it could also just be 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.
LGTM!
No description provided.