java-library plugin leaking dependencies
NickName:Roshaan Farrukh Ask DateTime:2019-11-17T22:24:24

java-library plugin leaking dependencies

My project has two modules data(com.android.library) and domain(java-library), data module depends on domain.

build.gradle(data)

    implementation(project(":domain"))

In build.gradle of domain module I have declared retrofit dependency with implementation.

    implementation(DevelopmentDependencies.retrofit)

According to docs since I am using implementation I should be unable to access Retrofit inside data module but the problem is that I am able to access Retrofit in data. module.https://docs.gradle.org/current/userguide/java_library_plugin.html#sec:java_library_separation

Kindly suggest if I am doing something wrong.

Copyright Notice:Content Author:「Roshaan Farrukh」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/58901426/java-library-plugin-leaking-dependencies

More about “java-library plugin leaking dependencies” related questions

java-library plugin leaking dependencies

My project has two modules data(com.android.library) and domain(java-library), data module depends on domain. build.gradle(data) implementation(project(":domain")) In build.gradle of domain ...

Show Detail

Does java-library plugin fully cover java plugin functionality?

According to API and implementation separation doc the java-library plugin should be used to declare dependencies as api: apply plugin: 'java-library' Is java-library full replacement for java pl...

Show Detail

Copy all dependencies in a gradle project using java-library plugin

Is there a way to copy all (including transitive) dependencies (jars) of a gradle project that uses java-library plugin to some folder, using a gradle task? I can list all jars from the

Show Detail

android gradle: plugin id java-library not found

The following works fine for a war project: configure([project(':foo'), project(':bar')]) { apply plugin: 'java-library' .... } But for android, plugin id 'java-library&

Show Detail

Use Gradle Witness plugin with java-library

For a long time I was using Gradle with the java plugin, and Gradle Witness to verify Maven dependencies. e.g.: apply plugin: 'java' apply plugin: 'witness' dependencies { compile "io.netty:n...

Show Detail

Gradle java-library plugin compared to java plugin

In the Gradle documentation for the java-library plugin it states: The Java Library plugin expands the capabilities of the Java plugin by providing specific knowledge about Java libraries. In

Show Detail

java-library does not expose scala classes

I have a gradle project that uses subprojects. One of them (common) uses an external library: // common/build.gradle.kts dependencies { implementation("com.example:external-lib:1.2.3") } and ...

Show Detail

Java-Library dependencies not being imported when jar is depended on

I am attempting to move some commonly used modules into their own project so they can be uploaded to a private repository and used in applications. Currently, they are all in one multi-project

Show Detail

Gradle java-library dependency issues

I have developed a Java library using the java-library Gradle plugin. This library has e dependency on protobuf-java which I need to expose as a transitive dependency to users of the library. I hav...

Show Detail

Gradle platform dependencies with java-library

We have a couple of common libraries, which use the java-library Gradle plugin, and depend on Micronaut via a platform dependency on it's BOM. Both projects use Gradle 6.6.1 which is the latest at ...

Show Detail