7

In Android Studio 1.3.2, I have set sdk.dir and ndk.dir set in local.properties, but how can I access them within my gradle build scripts?

What I want to do is call ndk-build manually without having to hard code a path to the ndk-build, which now is in a known location at sdk/ndk-bundle/ndk-build. Are these path variables exposed, or, how can I expose them?

Brian D
  • 9,863
  • 18
  • 61
  • 96

1 Answers1

5

You can get the ndk.dir by android.ndkDirectory. Look at this answer to see how you can call ndk-build from gradle: https://stackoverflow.com/a/28566337/3836816

Community
  • 1
  • 1
Prim
  • 116
  • 6
  • Thanks, I'll play with that. In my first stab it didn't seem to work with Gradle 2.5 experimental / Android Studio 1.3.2 but I will keep trying. – Brian D Sep 24 '15 at 17:59