-
Notifications
You must be signed in to change notification settings - Fork 24
Download the NDK in Bazel #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
This is ready to review and 🚀 - we're using it as-is in our workspace and everything works nicely. |
|
Thanks, I'm asking internally whether we can have such a feature in rules_android, since the download pages for the NDK (and SDK fwiw) present Terms and Conditions that you have to accept before downloading. |
|
Fair point, I guess that could be a problem. However, if this is required, we could maybe think of introducing a feature that users need to toggle once per host or something like that? EDIT: another idea is to add a flag |
|
One more data point if that helps: I just noticed that the |
|
Any chance this will land anytime soon? This seem to close #2 too. |
This is surprising to me, but doesn't affect our (the Bazel team)'s position on this issue -- we don't want to set the precedent of allowing users to bypass agreeing to EULAs. We did end up asking internally, and the advice was to not pursue this feature. |
Would it be possible to accept the EULA once, save the fact that it's accepted into a file, and then allow rule-based downloads? AFAIK, the Android SDK Tools on headless machines take a similar approach. Also, I'm new to Bazel, so I don't know if it's possible, but maybe some repository rules could have the ability to pause and prompt a user to accept a license or enter the username/password/MFA code needed for download (e.g., also to download specific Xcode from xcodereleases.com). |
The rule now ignores
ANDROID_NDK_HOMEand defaults to downloading ther25cNDK for the current platform (failing if the platform is not supported).One can specify three new attributes:
versionto select the NDK to downloadbase_urlif you don't want to usehttps://dl.google.com/android/repositorysha256sumsto add checksums for (yet) unsupported NDK releasesAlso:
repository_ctxto avoid the rule implementation function from being restarted (this wasn't so visible with the local install)defaultin attribute forapi_versionnative.register_toolchains()since this will register the NDK as the default C++ toolchain, which shouldn't be the default assumption.TODO:
ctxattributes to avoid the rule restarting multiple timesCloses #44