Skip to content

Gradle Builder and java library plugin

BJ Hargrave edited this page Feb 1, 2020 · 2 revisions

Gradle Builder and java-library plugin

When using the java-library plugin, multi-module project dependencies (e.g. api(project(":foo"))) only require the classes folder for compilation. Thus the output jars are not built and bnd will not be able to observer OSGi metadata for those projects.

As of Gradle 5.6, a solution is to apply the system property org.gradle.java.compile-classpath-packaging=true which was designed as part of the solution to a memory issue.

Bnd 5.0.0 now will automatically handle this when using Gradle 5.6 or later. See #3642.

Clone this wiki locally