Scenario
I have two Android libraries:
Library B depends on Library A and includes it from its build.gradle.
My Android app needs to use Library B and some base classes from Library A. The only success I've had in doing this is including both libraries in my Android app's build.gradle and setting transitive to false.
Question:
Is there a way for me to only add Library B and have access to its dependency from my Android app?
Android Studio
Android Studio 3.1 Canary
Build #AI-171.4415322, built on October 24, 2017
JRE: 1.8.0_152-release-1012-b01 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.6
Gradle
3.1.0-alpha01
From comments if you need to use library A inside your app and your library A included into B using implementation project(':LibA'), then it won't be a transitive to your main app.
You have to include it into B using api, api project(':LibA').
The api configuration should be used for dependencies that are exported to external modules (transitive dependency). Vice-Versa implementation configuration should be used for dependencies that are internal to the component (not transitive dependency).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With