Closed phhusson closed 4 years ago
The way I usually setup my projects is by setting ndk.dir (and sdk.dir) in project's local.properties, and I build using ./gradlew assembleRelease.
This doesn't work, because cargo-ndk exclusively use environment variables, and it looks like gradle doesn't set the environment to the program.
Since cargo-ndk 0.6.1, ANDROID_NDK_HOME is favored: https://github.com/bbqsrc/cargo-ndk/commit/25402db1389a2f27f01027377a97c6902523b28a
So ideally cargo-ndk-android-gradle should copy ndk.dir into ANDROID_NDK_HOME
Thanks for the issue, I'll take a look at how it can be implemented shortly.
Hi, I have implemented that functionality, it is published as a 0.2.0 version.
Thanks
Tested and it works fine in my use-case. :tada:
The way I usually setup my projects is by setting ndk.dir (and sdk.dir) in project's local.properties, and I build using ./gradlew assembleRelease.
This doesn't work, because cargo-ndk exclusively use environment variables, and it looks like gradle doesn't set the environment to the program.
Since cargo-ndk 0.6.1, ANDROID_NDK_HOME is favored: https://github.com/bbqsrc/cargo-ndk/commit/25402db1389a2f27f01027377a97c6902523b28a
So ideally cargo-ndk-android-gradle should copy ndk.dir into ANDROID_NDK_HOME