Hi, I’m noticing that when I try to build with custom build types in Gradle 2.4, that they are ignored if I define a task with the same name as one of the build types.
Here is my build.gradle:
apply plugin: 'cpp'
model {
buildTypes {
debug
release
}
flavors {
mint
chocolate
}
components {
main(NativeExecutableSpec)
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.4'
}
task release() {
}
When building I get the following output:
$ ./gradlew build
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
:compileChocolateMainExecutableMainCpp
:linkChocolateMainExecutable
:chocolateMainExecutable
:compileMintMainExecutableMainCpp
:linkMintMainExecutable
:mintMainExecutable
:assemble
:check UP-TO-DATE
:build
BUILD SUCCESSFUL
Total time: 2.539 secs
And here are the results in the build/binaries
directory:
$ tree ./build/binaries
./build/binaries
└── mainExecutable
├── chocolate
│ └── main
└── mint
└── main
3 directories, 2 files
I expected to get binaries for the following variants:
- debugChocolate
- releaseChocolate
- debugMint
- releaseMint
Here is a link to a project that demonstrates the issue.