Library dependency issues with gradle 3.0.0-alphaX

I have a library project with submodules that include many dependencies that I would like to pass to the developer. For example, a module Amay include all the necessary appcomp dependencies.

With the changes , I updated all cases compileto api, which will not affect anything. However, I no longer have access to any of the library dependencies. I can only use code and links from my library itself.

Is there any way around this?

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

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:

, , , jitpack. . gradle , . api, implementation, @aar transitive.

, jitpack, gradle, - , .

+4
3

, , android-maven- gradle -plugin

I ssue

0

"2.0" android-maven-gradle-plugin

dependencies {
        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
}

, Gradle 2.1

plugins {
  id "com.github.dcendents.android-maven" version "2.0"
}


api , ; , .

, .

implementation project(':core')

api project(':core')

note api , implementation, .

0

. .

.

gradle docs:

dependencies {
    api 'commons-httpclient:commons-httpclient:3.1'
    implementation 'org.apache.commons:commons-lang3:3.5' 
}

, api, , .

, implementation, , , , . :

  • ,
  • classpath
  • :
  • pure publication: when used in conjunction with the new maven-publish plugin, Java libraries create POM files that clearly distinguish between what is required to compile the library and what is required to use the library at runtime (in other words, do not mix what necessary to compile the library itself and what is required to compile with the library).

0
source

Source: https://habr.com/ru/post/1682800/


All Articles