Hi Raymond,
For the record, after looking at the source code for the Gradle Experimental plug-in, I eventually figured it out:
java.source.srcDirs and jni.source.srcDirs do not behave the same: for the JNI case, even if you define the jni.source.srcDirs setting, src/main/jni is always included by default, but that's not the case for the Java case.
So the correct syntax becomes:
android.sources {
main {
java.source {
srcDirs += "src/main/java" <------- REQUIRED SINCE DEFAULT IS NOT PRESERVED
srcDirs += "../../JavaBindings/java"
}
jni.source {
srcDirs += "../../JavaBindings/jni"
}
}
}
- Pol