Skip to content
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

Adding downloading of NDK inside Bazel #44

Open
gferon opened this issue Sep 5, 2023 · 5 comments · May be fixed by #51
Open

Adding downloading of NDK inside Bazel #44

gferon opened this issue Sep 5, 2023 · 5 comments · May be fixed by #51

Comments

@gferon
Copy link
Contributor

gferon commented Sep 5, 2023

I have a working prototype of downloading the NDK directly in Bazel for both Linux and macOS. Would that be something interesting to contribute in rules_android_ndk?

I find providing the path of the NDK via an environment variable relatively brittle and it's much easier IMO to have Bazel download the toolchain when onboarding new devs.

@kkpattern
Copy link

We used to do this internally, and it's very convenient. But I believe the new NDK only provides dmg files, not zip files, on macOS due to security requirements. So we switched back to the environment variable for now.

@kkpattern
Copy link

If we do get a zipped ndk, I think one workaround is using xattr -d com.apple.quarantine FILENAME to remove the quarantine flag from the directly downloaded executable files.

@DanAlbert
Copy link

But I believe the new NDK only provides dmg files, not zip files

The zip file still exists, it's just not published on the download pages because people kept downloading the wrong thing and then filing bugs about it not being compatible with gatekeeper (which is impossible to do per Apple's requirements). Just replace .dmg with .zip in the download URL.

If we do get a zipped ndk, I think one workaround is using xattr -d com.apple.quarantine FILENAME to remove the quarantine flag from the directly downloaded executable files.

Not required unless whatever tool you're using to download the zip applies the quarantine flag in the first place, fwiw. I haven't seen anything but a web browser do this, so not likely needed here.

@kkpattern
Copy link

That's awesome! We are definitely interested in downloading NDK inside Bazel. We can help if needed.

@gferon
Copy link
Contributor Author

gferon commented Sep 8, 2023

The zip file still exists, it's just not published on the download pages because people kept downloading the wrong thing and then filing bugs about it not being compatible with gatekeeper (which is impossible to do per Apple's requirements). Just replace .dmg with .zip in the download URL.

This is excellent news! Thanks for the tip. I'll open a PR ASAP.

@gferon gferon linked a pull request Sep 19, 2023 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants