I have a multi project gradle build, configured in this way:
root
|
|---- projectA
|
|---- projectB
I want to declare in the root/build.gradle
a dependency for all nested projects, this is the file:
subprojects {
version = '1.0-SNAPSHOT'
repositories {
mavenLocal()
mavenCentral()
maven {
url 'https://repository.jboss.org/nexus/content/groups/public-jboss/'
}
}
}
allprojects {
dependencies {
compile 'org.projectlombok:lombok:1.12.2'
}
}
But when I execute the build, I have:
* What went wrong:
A problem occurred evaluating root project 'code'.
No signature of method:
org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.compile() is applicable for argument types: (java.lang.String) values: [org.projectlombok:lombok:1.12.2]
Possible solutions: module(java.lang.Object)
What I am doing wrong?
subprojects
here, rather thanallprojects
. – Unaccountable