willir / cargo-ndk-android-gradle

Cargo NDK for Android projects
Apache License 2.0
55 stars 7 forks source link

Use local.properties' path to ndk? #1

Closed phhusson closed 4 years ago

phhusson commented 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

willir commented 4 years ago

Thanks for the issue, I'll take a look at how it can be implemented shortly.

willir commented 4 years ago

Hi, I have implemented that functionality, it is published as a 0.2.0 version.

phhusson commented 4 years ago

Thanks

phhusson commented 4 years ago

Tested and it works fine in my use-case. :tada: