my IDE is android studio 2.2
i want to extract the common code from build.gradle(Module) into top-level build.gradle(Project) for common use.
i tried subprojects block as below, but it not work:
subprojects {
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.aspectj:aspectjtools:1.8.9'
classpath 'org.aspectj:aspectjweaver:1.8.9'
}
}
dependencies {
compile 'org.aspectj:aspectjrt:1.8.9'
}
}
i get this error:
Could not find method compile() for arguments [org.aspectj:aspectjrt:1.8.9] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
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.