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

Document / Example how to use external android dependency like: Appcompat-v7 #1428

Closed
jvmvik opened this issue Jun 19, 2016 · 7 comments
Closed
Assignees
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) type: documentation (cleanup)

Comments

@jvmvik
Copy link

jvmvik commented Jun 19, 2016

The Android documentation does not explain how to deals with external android dependency like: Appcompat-v7.
http://www.bazel.io/docs/tutorial/android-app.html

The example should also illustrate such common task.

@philwo philwo added type: documentation (cleanup) P3 We're not considering working on this, but happy to review a PR. (No assignee) labels Jun 21, 2016
@ahumesky
Copy link
Contributor

Yes, this is all unfortunately under-documented, which we're working on.
The short answer is that you can depend on appcompat v7 with @android-sdk//:appcompat_v7
"Android Support Library" must be downloaded in the SDK manager for the dependency to work.

The the rules created for the SDK are available at
https://github.com/bazelbuild/bazel/blob/master/tools/android/android_sdk_repository_template.bzl

@aj-michael
Copy link
Contributor

Keeping this issue open because this is still under-documented. In case anyone sees this in the future, the current syntax for external dependencies from the Android SDK is documented in issue #1745.

@aj-michael
Copy link
Contributor

This was documented in c3c4f36. The docs are now live on https://bazel.build/versions/master/docs/be/workspace.html#android_sdk_repository.

@TastyPi
Copy link

TastyPi commented Aug 28, 2017

Seems the android_sdk_repository is no longer documented on that page and @android-sdk//:appcompat_v7 no longer works. What's the correct way to add support library dependencies now?

@ahumesky
Copy link
Contributor

The documentation has been moved to the Android rules page:
https://docs.bazel.build/versions/master/be/android.html#android_sdk_repository

@JakeWharton
Copy link

They're available from maven.google.com as standard Maven artifacts. There's no need to pull them from the SDK anymore.

@TastyPi
Copy link

TastyPi commented Aug 28, 2017

Yeah, I started trying to get the Maven artifacts working but got stuck. See #3633.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) type: documentation (cleanup)
Projects
None yet
Development

No branches or pull requests

6 participants