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

Unable to set custom api_level and build_tools_version #93

Open
changusmc opened this issue Oct 17, 2019 · 2 comments
Open

Unable to set custom api_level and build_tools_version #93

changusmc opened this issue Oct 17, 2019 · 2 comments
Labels
enhancement New feature or request P3

Comments

@changusmc
Copy link

changusmc commented Oct 17, 2019

Hello, I'm trying to use this rule in my Workspace as such

http_archive(
    name = "google_bazel_common",
    strip_prefix = "bazel-common-9e3880428c1837db9fb13335ed390b7e33e346a7",
    urls = ["https://github.com/google/bazel-common/archive/9e3880428c1837db9fb13335ed390b7e33e346a7.zip"],
)

load("@google_bazel_common//:workspace_defs.bzl", "google_common_workspace_rules")

google_common_workspace_rules()

I want to set the api_level to 28 and build_tools_version to 28.0.3, I don't see any way to do that currently.

If I add android_sdk_repository after loading google_common_workspace_rules, I get this error:

Error:/Users/changd/dev/xplat/WORKSPACE:87:1: Cannot redefine repository after any load statement in the WORKSPACE file (for repository 'androidsdk')

Can we parameterize google_common_workspace_rules()?

@jingtang10
Copy link

+1

This is a blocker for us as well.

@jingtang10
Copy link

I'd like to post our workaround for this issue. We have essentially made a copy of https://github.com/google/bazel-common/blob/master/workspace_defs.bzl and stripped out the native.android_sdk_repository in the definition google_common_workspace_rules.

It's awfully hacky - so yes would very much like to see this resolved.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants