How to use “sourceSets.main.jni.srcDirs = []” in gradle experimental


(Walter) #1

Hello,
in my gradle-build I have this istruction:

sourceSets.main.jni.srcDirs = []

but I need to migrate to gradle experimental (to be able to use breakpoints to debug native source), is there possible to use it in some way in gradle-experimental?

Thank you


(René Groeschke) #2

Hey,

can you explain what you mean with gradle-experimental?

cheers,
René


(Walter) #3

Hello,
I mean that: http://tools.android.com/tech-docs/new-build-system/gradle-experimental
thank you


(Nandita Suri) #4

Any solution to this question. I have similar issue. I am trying to use gradle experimental plugin so that i can set breakpoints in native code.
My existing gradle build file has following lines:

sourceSets {
main {
assets.srcDirs = [‘src/main/assets’, ‘ovpnlibs/assets’]
jniLibs.srcDirs = [‘ovpnlibs/jniLibs’]
jni.srcDirs = [] //disable automatic ndk-build
}
}

How to use the same when using com.android.tools.build:gradle-experimental:0.7.0
android.sourceSets {

}
when i use the above, it thrown an error.

Can you please help me out ?


(Liam Li) #5

sources {
    main {
        jniLibs {
            source {
                srcDirs += “libs”
            }
        }
    }
}