-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Update android_sdk_repository to create a valid, but useless, repository #12070
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if the SDK doesn't actually exist. This allows non-Android builds to proceed but will fail building android code. Fixes bazelbuild#12069.
jin
approved these changes
Sep 9, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice :)
nkoroste
pushed a commit
to nkoroste/bazel
that referenced
this pull request
Feb 23, 2021
**Background** In order to use Bazel to build for Hermosa, we need to be able to compile for arm64 architecture. This requires the repository rule `android_ndk_repository` to be included in the WORKSPACE. However, including this rule for all Android developers will require the Android NDK to be installed, even if it is not being used to compile for different architectures. This PR is very similar to the one already in Bazel that adds support for non-Android builds that have `android_sdk_repository` in their WORKSPACE. bazelbuild#12070 The changes here will allow for `android_ndk_repository` to be included in a WORKSPACE without the need to have the Android NDK installed (except, of course, if one is attempting to compile non-default CPU architecture, in which case it will appropriately fail). https://jira.sc-corp.net/browse/HSW-8831 **Changes** - Modify `AndroidNdkRepositoryFunction` to create an empty repository file based on a template if it detects that the Android NDK is not installed. - Update integration tests and add a new one to confirm new functionality. **Test Plan** Using CI build from this PR, pull in to Android repo and confirm the following. Without NDK installed: - [x] Able to build mushroom and confirm NDK doesn't download. - [x] Able to build client linked mushroom build and confirm NDK doesn't download. - [x] Able to build hermosa apks with arm64 and confirm NDK downloads. With NDK installed: - [x] Able to build mushroom. - [x] Able to build client linked mushroom build. - [x] Able to build hermosa apks with arm64 and confirm NDK doesn't redownload. --- Automatic squash commit from https://github.sc-corp.net/Snapchat/bazel/pull/84 Cooled by kbauer
chancila
added a commit
to chancila/bazel
that referenced
this pull request
Jun 23, 2021
This change is very similar to the one already in Bazel that adds support for non-Android builds that have `android_sdk_repository` in their WORKSPACE. See bazelbuild#12070 This changes here will allow for `android_ndk_repository` to be included in a WORKSPACE and not cause a failure until a target actually attempts to use things in the NDK.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
if the SDK doesn't actually exist.
This allows non-Android builds to proceed but will fail building android
code.
Fixes #12069.