Skip to content

Commit

Permalink
Use guava "-android" artifacts for "guava_jdk5" deps.
Browse files Browse the repository at this point in the history
Previously, we were replacing "//third_party/java/android_libs/guava_jdk5" with the non-android artifact, which can cause build issues for android libraries.  This CL switches over to use the "guava:*-android" artifact for guava used with android_libraries.

RELNOTES=N/A

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=291759173
  • Loading branch information
bcorso authored and cpovirk committed Jan 28, 2020
1 parent 51764b5 commit d025b20
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
1 change: 1 addition & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ load("@rules_jvm_external//:defs.bzl", "maven_install")

maven_install(
artifacts = [
"com.google.guava:guava:27.1-android",
"com.android.support:support-annotations:25.0.0",
"com.android.support:support-fragment:25.0.0",
"com.android.support:appcompat-v7:25.0.0",
Expand Down
15 changes: 15 additions & 0 deletions java/dagger/internal/guava/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,18 @@ alias(
name = "concurrent",
actual = "@google_bazel_common//third_party/java/guava",
)

alias(
name = "base-android",
actual = "@maven//:com_google_guava_guava",
)

alias(
name = "collect-android",
actual = "@maven//:com_google_guava_guava",
)

alias(
name = "concurrent-android",
actual = "@maven//:com_google_guava_guava",
)
8 changes: 4 additions & 4 deletions java/dagger/producers/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
# Description:
# An asynchronous dependency injection system that extends JSR-330.

package(default_visibility = ["//:src"])

load(
"//:build_defs.bzl",
"DOCLINT_HTML_AND_SYNTAX",
Expand All @@ -25,6 +23,8 @@ load(
)
load("//tools:maven.bzl", "POM_VERSION", "gen_maven_artifact")

package(default_visibility = ["//:src"])

# Work around b/70476182 which prevents Kythe from connecting :producers to the .java files it
# contains.
SRCS = glob(["**/*.java"])
Expand All @@ -40,8 +40,8 @@ java_library(
javacopts = SOURCE_7_TARGET_7 + DOCLINT_HTML_AND_SYNTAX + DOCLINT_REFERENCES,
tags = ["maven_coordinates=com.google.dagger:dagger-producers:" + POM_VERSION],
exports = [
# TODO(dpb): Don't export any of Guava.
"@google_bazel_common//third_party/java/guava",
"//java/dagger/internal/guava:base",
"//java/dagger/internal/guava:concurrent",
"@google_bazel_common//third_party/java/jsr330_inject",
],
deps = [
Expand Down

0 comments on commit d025b20

Please sign in to comment.