Gradle nested multi-projects with project compile dependencies

前端 未结 1 1591
萌比男神i
萌比男神i 2020-12-15 03:55

I have an identical problem to this Gradle Multi-Module Project Setup but I have to use project compile dependencies to build and cannot use the library(jar) dependencies so

1条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-15 04:00

    A build can only have a single settings.gradle file. Assuming settings.gradle is in the root directory and includes projects like so:

    include "P1:PP1"
    

    You can add a compile dependency like so:

    dependencies {
        compile(project(":P1:PP1"))
    }
    

    For more information, see the "Multi-Project Builds" chapter in the Gradle User Guide.

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