I've the following gradle project structure:
SUPER/
|______A/
| |______A1/
| | |______build.gradle
| |______A2/
| | |______build.gradle
| |______build.gradle
| |______settings.gradle
|
|______B/
| |______build.gradle
| |______settings.gradle
|
|______build.gradle
|______settings.gradle
My build.gradle from the A-Project contains somethings like that:
...
project(":A1") {
apply plugin: "java-library"
dependencies {
api project(":A2")
}
}
project(":A2") {
apply plugin: "java-library"
dependencies {
...
}
}
...
My "Super"-settings.gradle file contains something like that:
rootProject.name = 'SUPER'
include 'A'
include 'B'
In my sub-project "A" the settings.gradle looks like that:
include 'A1', 'A2'
When calling the gradlewrapper like that "./gradlew SUPER:A1:sometask
" on the command line from the SUPER-folder, it fails with the message:
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\<somepath>\SUPER\A\build.gradle' line: 44
* What went wrong:
A problem occurred evaluating project ':A'.
> Project with path ':A1' could not be found in project ':A'.
But when doing something like that "./gradlew A1:sometask
" from the A-sub-project-folder, it works successfully.
can you explain me what am I'm doing here wrong?