July 23 2018, Snapshot 2
Add this in your WORKSPACE file:
# Google Maven Repository
GMAVEN_TAG = "20180723-2"
http_archive(
name = "gmaven_rules",
strip_prefix = "gmaven_rules-%s" % GMAVEN_TAG,
url = "https://github.com/bazelbuild/gmaven_rules/archive/%s.tar.gz" % GMAVEN_TAG,
)
load("@gmaven_rules//:gmaven.bzl", "gmaven_rules")
gmaven_rules()
Use the gmaven_artifact
macro in your BUILD file:
load("@gmaven_rules//:defs.bzl", "gmaven_artifact")
android_library(
...
deps = [
gmaven_artifact("com.android.support:design:aar:27.0.2"),
gmaven_artifact("com.android.support:support_annotations:jar:27.0.2"),
gmaven_artifact("com.android.support.test.espresso:espresso_core:aar:3.0.1"),
],
)