Include /libs/ folder in aar

后端 未结 2 1296
慢半拍i
慢半拍i 2021-01-22 07:46

Feel like Im going mad here - this must be so simple!

I have an android aar which I have built from gradle assembleRelease and also using the maven-pu

相关标签:
2条回答
  • 2021-01-22 07:59

    The aar packages local libraries in libs/ so you need to have local jar dependencies.

    dependencies {
      compile fileTree(include: ['*.jar'], dir: 'libs')
    }
    
    0 讨论(0)
  • 2021-01-22 08:10

    When the maven plugin runs uploadArchives then it will create a pom file that tells maven or gradle what dependencies your aar needs. Gradle will handle downloading the jar files and placing them in your class path for the build.

    I commented on your other question as well

    *reference: https://maven.apache.org/pom.html#Dependencies

    *=gradle is backed by maven for dependency management so artifacts available to maven are also available to gradle and vice versa

    0 讨论(0)
提交回复
热议问题