Gradle: How to publish a Android library to local repository

后端 未结 5 1737
逝去的感伤
逝去的感伤 2020-12-04 10:47

I have a library and a Android app using Gradle and Android Studio. I can include the library directly in the project as following

compile project(\':library         


        
5条回答
  •  北荒
    北荒 (楼主)
    2020-12-04 11:18

    Publish de library on your local maven repository and then on your gradle use

    repositories {
      mavenLocal()
    }
    

    If you have other repositories listed, make sure your mavenLocal appears first.

    Docs: section 51.6.4 on https://gradle.org/docs/current/userguide/dependency_management.html

提交回复
热议问题