The C++ stuff is a work in progress, and we plan to make it easy for you to just grab the language support and define your own conventions. In ‘gradle-1.7-rc-1’, you should be able to handle your proposed source layout like:
cpp {
sourceSets {
main {
source {
srcDir "src"
include "**/*.cpp"
}
// Gradle currently has no concept of 'private' headers
exportedHeaders {
srcDir "src"
// There no convenient way to include headers recursively (this is a bug)
srcDirs "include/project1", "include/project2"
}
}
}
Note that in ‘gradle-1.8’ (latest nightly) the syntax has changed slightly to: sources {
main {
cpp {
source {
srcDir … etc </code