Search code examples
androidgradleandroid-gradle-pluginbuild.gradlejitpack

Library dependency issues with gradle 3.0.0-alphaX


I have a library project with submodules that include many dependencies that I'd like to pass to the developer's application. For example, module A may include all the necessary appcompat dependencies.

With the migration changes, I've updated all compile cases to api, which should not affect anything. However, I no longer have access to any of the libraries dependencies. I can only use code and references from my library itself.

Is there any way around this?

One of the build gradle files of my library submodules can be found here for reference.

The dependencies:

dependencies {
    api "org.jetbrains.kotlin:kotlin-stdlib:${KOTLIN}"

    api "com.android.support:appcompat-v7:${ANDROID_SUPPORT_LIBS}"
    api "com.android.support:support-v13:${ANDROID_SUPPORT_LIBS}"
    api "com.android.support:design:${ANDROID_SUPPORT_LIBS}"
    api "com.android.support:recyclerview-v7:${ANDROID_SUPPORT_LIBS}"
    api "com.android.support:cardview-v7:${ANDROID_SUPPORT_LIBS}"
    api "com.android.support.constraint:constraint-layout:${CONSTRAINT_LAYOUT}"

    api "com.mikepenz:iconics-core:${ICONICS}@aar"
    api "com.mikepenz:google-material-typeface:${IICON_GOOGLE}.original@aar"

    api "com.afollestad.material-dialogs:core:${MATERIAL_DIALOG}"

    api "com.jakewharton.timber:timber:${TIMBER}"

    api "org.jetbrains.anko:anko-commons:${ANKO}"
}

Edit:

To clarify, the sample project in the module actually does build properly, but there's an issue with using the dependencies in any other app, where it pulls from jitpack. See this gradle as an example that won't build. I've tried using combinations of api, implementation, @aar, and transitive.

Come to think of it, this may be a jitpack issue and not a gradle issue, but if anyone else has a resolution I'd like to hear it.


Solution

  • The issue seems to be related to the android-maven-gradle-plugin

    Issue Report