diffplug / diffplug/goomph

bndautomanifest (Java 9 module -> OSGi)

Open
#29 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
137
Forks
33
PR merge metrics
No merged PRs in 30d

Description

In gradle 3.4, there is now [support for separate api and implementation dependencies](https://docs.gradle.org/current/userguide/java_library_plugin.html).

```gradle
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](https://discuss.gradle.org/t/will-java-library-get-support-for-declaring-api-packages/21845).

```gradle
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.