Skip to content

Commit

Permalink
Fix manifest import-package imports (#779)
Browse files Browse the repository at this point in the history
  • Loading branch information
rozza authored Sep 6, 2021
1 parent c52dabf commit 23921b3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 23 deletions.
5 changes: 4 additions & 1 deletion bson-scala/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,7 @@ test {
maxParallelForks = 1
}

jar.manifest.attributes['Import-Package'] = 'org.bson.*'
jar.manifest.attributes['Import-Package'] = [
'!scala.*',
'*'
].join(',')
24 changes: 9 additions & 15 deletions driver-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,14 @@ afterEvaluate {
jar.manifest.attributes['Automatic-Module-Name'] = 'org.mongodb.driver.core'
jar.manifest.attributes['Bundle-SymbolicName'] = 'org.mongodb.driver-core'
jar.manifest.attributes['Import-Package'] = [
'org.bson.*', // unfortunate that this is necessary, but if it's left out then it's not included
'javax.crypto.*',
'javax.management.*',
'javax.naming.*',
'javax.net.*',
'jdk.net.*',
'javax.security.sasl.*',
'javax.security.auth.callback.*',
'org.ietf.jgss.*',
'io.netty.*;resolution:=optional',
'org.xerial.snappy.*;resolution:=optional',
'com.github.luben.zstd.*;resolution:=optional',
'org.slf4j.*;resolution:=optional',
'jnr.unixsocket.*;resolution:=optional',
'com.mongodb.crypt.capi.*;resolution:=optional'
'!sun.misc.*', // Used by DirectBufferDeallocator only for java 8
'!sun.nio.ch.*', // Used by DirectBufferDeallocator only for java 8
'io.netty.*;resolution:=optional',
'org.xerial.snappy.*;resolution:=optional',
'com.github.luben.zstd.*;resolution:=optional',
'org.slf4j.*;resolution:=optional',
'jnr.unixsocket.*;resolution:=optional',
'com.mongodb.crypt.capi.*;resolution:=optional',
'*' // import all that is not excluded or modified before
].join(',')
}
4 changes: 1 addition & 3 deletions driver-reactive-streams/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ afterEvaluate {
jar.manifest.attributes['Automatic-Module-Name'] = 'org.mongodb.driver.reactivestreams'
jar.manifest.attributes['Bundle-SymbolicName'] = 'org.mongodb.driver-reactivestreams'
jar.manifest.attributes['Import-Package'] = [
'org.bson.*',
'com.mongodb.crypt.capi.*;resolution:=optional',
'com.mongodb.*',
'reactor.core.*',
'*',
].join(',')
}
4 changes: 2 additions & 2 deletions driver-scala/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ ext {
afterEvaluate {
jar.manifest.attributes['Automatic-Module-Name'] = 'org.mongodb.scala.mongo-scala-driver'
jar.manifest.attributes['Import-Package'] = [
'org.bson.*',
'com.mongodb.*',
'!scala.*',
'*'
].join(',')
}
3 changes: 1 addition & 2 deletions driver-sync/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ afterEvaluate {
jar.manifest.attributes['Automatic-Module-Name'] = 'org.mongodb.driver.sync.client'
jar.manifest.attributes['Bundle-SymbolicName'] = 'org.mongodb.driver-sync'
jar.manifest.attributes['Import-Package'] = [
'org.bson.*',
'com.mongodb.crypt.capi.*;resolution:=optional',
'com.mongodb.*',
'*',
].join(',')
}

0 comments on commit 23921b3

Please sign in to comment.