Does anyone knows how the includes of srcDir works in gradle experimental files (cpp AND h)? This is kind of a "3-fold" question:
1°) how do the srcDir work?
1.a°) Does it include recursively all subdirs? Does it only include files at their deep level? Does it they include all cpp/c/cc/cxx files?
for example this command:
android.sources {
main {
jni {
source {
srcDir "../../../../some/path/src"
}
}
}
}
Does it include all cpp files under src? all files under src? all cpp files recursively into subdirs? all files recursively into subdirs?
The google documentation is very vague:
http://tools.android.com/tech-docs/new-build-system/gradle-experimental
and the gradle one is not clear either:
https://docs.gradle.org/current/userguide/nativeBinaries.html
It says it only includes src/${name}/cpp ? what does it mean? Do I have to create a
../../../../some/path/src/cpp
folder?
1.b°) What about the headers:
android.sources {
main {
jni {
exportedHeaders {
srcDir "../../../../some/path/src"
}
}
}
}
I have the feeling that the srcDir directive applied on headers works differently than the srcDir for source (it includes only the headers of its current depth)
2°) What if I want a mix between file and dir?
android.sources {
main {
jni {
source {
srcDir "../../../../some/path/src"
srcFile "../../../../some/path/src/myFile.cpp"
}
}
}
}
doesn't seem to work
3°) how does the include/ exclude directive works?
What about the include/exclude directive, does they apply only on the previous srcDir statement? Or do they apply on all the statement of the "source" block?
doing:
android.sources {
main {
jni {
source {
srcDir "../../../../some/path/src"
include "*.cpp"
}
}
}
}
doesn't seem to include any cpp file. I thought it would include all cpp files of this folder hierarchy, or even all cpp files under src, but it looks like it doesn't.
I want to point that I am using gradle 2.9, which is required by the latest gradle-experimental-0.6.0-alpha3 plugin.