IntelliJ gradle add module dependency

后端 未结 4 492
一生所求
一生所求 2020-12-01 03:01

Using IntelliJ 2016.2.
Using Gradle 2.14.1

I have 2 projects, each with their own build.gradle files and separate directory structures:

myLib (me         


        
4条回答
  •  伪装坚强ぢ
    2020-12-01 03:40

    This answer is outdated in modern gradle and intellij, please refer to darwinbaisa's answer

    Original answer

    Its discussed in the article https://blog.jetbrains.com/idea/2016/10/intellij-idea-2016-3-eap-gradle-composite-builds-and-android-studio-2-2/

    Basically you need to use composite builds. So View > Tool windows > Gradle > Right Click on the project using the library > Composite Build Configuration > Tick the library project you want to use the local version of.

    Do a rebuild and then the local dependancy should be used

提交回复
热议问题