Support relative workspace paths#69
Merged
ahumesky merged 1 commit intobazelbuild:mainfrom Jun 27, 2024
Merged
Conversation
51bb496 to
93b76aa
Compare
ahumesky
approved these changes
Jun 21, 2024
rules.bzl
Outdated
| "path attribute of android_ndk_repository must be set.") | ||
|
|
||
| if ndk_path.startswith("$WORKSPACE_ROOT"): | ||
| ndk_path = str(ctx.workspace_root) + ndk_path[15:] |
Collaborator
There was a problem hiding this comment.
for clarity let's make this ndk_path.removeprefix("$WORKSPACE_ROOT")
93b76aa to
f4c0b3f
Compare
This makes it possible to reference the NDK path if it exists within the workspace.
f4c0b3f to
6b36103
Compare
ahumesky
approved these changes
Jun 27, 2024
copybara-service bot
pushed a commit
to bazelbuild/rules_android
that referenced
this pull request
Dec 5, 2024
Make it possible for the Android SDK path to exist within the workspace when using the ANDROID_HOME repository environment variable. This is similar to bazelbuild/rules_android_ndk#69 which added the same behavior to rules_android_ndk PiperOrigin-RevId: 703138165 Change-Id: I1d255e2b4311ddcd21b8308869da77e2cc33405b
This file contains hidden or 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
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.
This makes it possible to reference the NDK path if it exists within the workspace. Using
--repo_env ANDROID_NDK_HOME=for different OS platforms makes it possible to change the path for different configurations.