Gradle multiproject define dependency on root project

前端 未结 2 1204
一向
一向 2021-02-07 21:30

I have a multi project gradle build, configured in this way:

root
  |
  |---- projectA
  |
  |---- projectB

I want to declare in the ro

相关标签:
2条回答
  • 2021-02-07 21:50

    compile method is part of the plugin you've been using (reference).

    allprojects {
    
        apply plugin: 'java'
        //so that we can use 'compile', 'testCompile' for dependencies
    
        dependencies {
            compile 'org.projectlombok:lombok:1.12.2'
        }
    }
    
    0 讨论(0)
  • 2021-02-07 22:07

    If you got the 'java' plugin has been applied, but it is not compatible with the Android plugins error, try this

    subprojects {
        afterEvaluate {
            dependencies {
                implementation "YOUR DEPENDENCIES"
            }
        }
    }
    
    0 讨论(0)
提交回复
热议问题