Skip to content

Commit

Permalink
fix #920 OSGI: explicit SymbolicName and fix imports-exports
Browse files Browse the repository at this point in the history
 - the `Import-Package` clause was missing an entry
   `io.netty.util.internal;version="[ 4.1,5)"` and had an unneeded one
   `reactor.netty.internal`
 - the `Bundle-SymbolicName` clause was changed to project name instead
   of a more fully qualified name
 - we now use explicit Export-Package rather than exporcontents (but
   with no wildcard, to avoid all classes ending up in jar...)

Reviewed-In: #921
  • Loading branch information
simonbasle committed Dec 3, 2019
1 parent d308b09 commit 0d47967
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.gradle.api.internal.plugins.osgi.OsgiHelper

buildscript {
repositories {
Expand Down Expand Up @@ -41,7 +40,6 @@ ext {
realVersion = version.toString().replace("BUILD-SNAPSHOT", versionBranch + ".BUILD-SNAPSHOT")
project.version = realVersion
println "Building special snapshot ${project.version}"
println "OSGI version would be: ${new OsgiHelper().getVersion(project.version.toString())}"
}
}

Expand Down Expand Up @@ -70,6 +68,13 @@ ext {
"https://projectreactor.io/docs/core/release/api/",
"https://netty.io/4.1/api/",
"https://projectreactor.io/docs/netty/release/api/",] as String[]

bndOptions = [
"Export-Package": "!reactor.netty.internal*,reactor.netty.*;-noimport:=true",
"Import-Package": '!javax.annotation,io.netty.channel.kqueue;resolution:=optional;version="[4.1,5)",*',
"Bundle-Name" : "reactor-netty",
"Bundle-SymbolicName" : "io.projectreactor.netty.reactor-netty"
]
}


Expand Down Expand Up @@ -239,10 +244,7 @@ configure(rootProject) { project ->
"Implementation-Title": project.name,
"Implementation-Version": project.version)
}
bnd(
"-exportcontents": "!*internal*,*;-noimport:=true",
"Import-Package": '!*internal*,!javax.annotation,io.netty.channel.kqueue;resolution:=optional;version="[4.1,5)",*'
)
bnd(bndOptions)
}

check.dependsOn jacocoTestReport
Expand Down

0 comments on commit 0d47967

Please sign in to comment.