简体   繁体   中英

Gradle new configuration in multi-project build

I created a new configuration in multi-project build and it doesn't download dependencies I assigned to it. Can't find any example on multi-project with new configuration on the net. Did anyone faced similar issue?

In my build.gradle root file:

allprojects {
    configurations {
      myConf
    }
}

Then in my build.gradle child:

dependencies {
    myConf 'org.aspectj:aspectjrt:1.8.6'
}

Project does not compile, when I change myConf to compile configuration it compiles correctly.

Dependencies of a configuration are only downloaded when the configuration is used. As the Java compiler uses the compile configuration, your myconf configuration is not used, so its dependencies are not downloaded.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM