goomph icon indicating copy to clipboard operation
goomph copied to clipboard

bndautomanifest (Java 9 module -> OSGi)

Open nedtwigg opened this issue 8 years ago • 1 comments

In gradle 3.4, there is now support for separate api and implementation dependencies.

dependencies {
    api 'commons-httpclient:commons-httpclient:3.1'
    implementation 'org.apache.commons:commons-lang3:3.5'
}

Soon (Q2 2017), it will also support declaring which packages are API.

api {
    exports 'com.somepackage'
}

Once this ships, we will create a plugin, osgi.bndautomanifest, which will use this metadata to automatically configure osgi.bndmanifest.

This way any library with Java 9 module metadata can easily support OSGi. Also, the api and implementation separation allows gradle to enforce that the implementation details aren't accidentally leaking into the api.

nedtwigg avatar Mar 16 '17 19:03 nedtwigg