bazelbuild / bazelbuild/rules_android
Unnecessary NDK requirement for apps that do not use native libs
Open
- Dominant language
- Java
- Stars
- 203
- Forks
- 95
- PR merge metrics
- No merged PRs in 30d
Description
`android_binary` builds will fail if `ANDROID_NDK_HOME` / `android_ndk_repository` aren't set even if it does not rely on native libs.
The implicit CC toolchain dependency originates [here](https://github.com/bazelbuild/rules_android/blob/main/rules/android_binary/attrs.bzl#L205), and is unconditionally used for processing in [native_libs.bzl](https://github.com/bazelbuild/rules_android/blob/main/rules/native_deps.bzl#L76-L78)
I was able to get our app to build without setting the NDK by butchering the toolchain code out, more or less, but a more elegant optionality would be great.
Contributor guide
Assessment
This issue has not been assessed yet.