diff options
author | twerth <twerth@google.com> | 2018-08-01 05:13:46 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-08-01 05:15:22 -0700 |
commit | 84f691324ec763d3284ba894ccc9bdab98363da4 (patch) | |
tree | 2c5a506db604be1a0806270adf00ff7a5b6d3388 /src/test/java/com/google/devtools/build/lib/rules | |
parent | 41d2b567222728047e1d06f0405741494b0745b6 (diff) |
Automated rollback of commit 38899f708923d6a7e1edd011af2ba70f505bb4c9.
*** Reason for rollback ***
Necessary for []
*** Original change description ***
Return Java providers only once
through JavaInfo, instead of returning them also through ConfiguredTarget. Since these providers can not be found in ConfiguredTarget anymore they have to be retrieved from JavaInfo instead.
RELNOTES: None.
PiperOrigin-RevId: 206915058
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/rules')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/rules/android/AndroidLibraryTest.java | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidLibraryTest.java b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidLibraryTest.java index 5b803e0761..bb9d76d744 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidLibraryTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidLibraryTest.java @@ -477,9 +477,8 @@ public class AndroidLibraryTest extends AndroidBuildViewTestCase { " srcs = ['dummy4.java'])"); ConfiguredTarget target = getConfiguredTarget("//java/com/google/exports:dummy"); - List<Label> exports = - ImmutableList.copyOf( - JavaInfo.getProvider(JavaExportsProvider.class, target).getTransitiveExports()); + List<Label> exports = ImmutableList.copyOf( + target.getProvider(JavaExportsProvider.class).getTransitiveExports()); assertThat(exports) .containsExactly( Label.parseAbsolute("//java/com/google/exports:dummy2", ImmutableMap.of()), @@ -1751,13 +1750,11 @@ public class AndroidLibraryTest extends AndroidBuildViewTestCase { Iterable<String> c1Jars = ActionsTestUtil.baseArtifactNames( - JavaInfo.getProvider(JavaCompilationInfoProvider.class, c1Target) - .getCompilationClasspath()); + c1Target.getProvider(JavaCompilationInfoProvider.class).getCompilationClasspath()); Iterable<String> c2Jars = ActionsTestUtil.baseArtifactNames( - JavaInfo.getProvider(JavaCompilationInfoProvider.class, c2Target) - .getCompilationClasspath()); + c2Target.getProvider(JavaCompilationInfoProvider.class).getCompilationClasspath()); assertThat(c1Jars).containsExactly("liba-hjar.jar"); assertThat(c2Jars).containsExactly("liba-hjar.jar"); @@ -1777,12 +1774,10 @@ public class AndroidLibraryTest extends AndroidBuildViewTestCase { ImmutableList<Artifact> bClasspath = ImmutableList.copyOf( - JavaInfo.getProvider(JavaCompilationInfoProvider.class, bTarget) - .getCompilationClasspath()); + bTarget.getProvider(JavaCompilationInfoProvider.class).getCompilationClasspath()); ImmutableList<Artifact> cClasspath = ImmutableList.copyOf( - JavaInfo.getProvider(JavaCompilationInfoProvider.class, cTarget) - .getCompilationClasspath()); + cTarget.getProvider(JavaCompilationInfoProvider.class).getCompilationClasspath()); assertThat(bClasspath).isEmpty(); assertThat(cClasspath) |