Comatibility of Java Library and Java Library Distribution plugins

plugins

(Valery Yatsynovich) #1

Hi, I’ve used Java and Java Library Distribution plugin to build and publish zip with dependencies:

apply plugin: 'java'
apply plugin: 'java-library-distribution'
apply plugin: 'maven-publish'
publishing {
    publications {
        maven(MavenPublication) {
            from components.java
            artifact distZip
        }
    }
}

But after switching to Java Library plugin and changing configurations from compile to api and implementation generated zip doesn’t contain dependencies anymore.

Is Java Library Distribution plugin compatible with Java Library plugin?

Thanks,


(Valery Yatsynovich) #2

Gradle issue: https://github.com/gradle/gradle/issues/5695
The fix is already merged and targeted to 5.0.