summaryrefslogtreecommitdiff
path: root/java/kotlin_test.go
diff options
context:
space:
mode:
author Sam Delmerico <delmerico@google.com> 2022-11-29 11:19:37 -0500
committer Sam Delmerico <delmerico@google.com> 2023-01-20 17:05:14 -0500
commit9f9c0a22faedef806fd3c35e047e1d5a0e313718 (patch)
tree260fffff9f0e425053eb65c96f82c8ad9bdce93e /java/kotlin_test.go
parent57b1e4064be7b3a0976da7a5c474ebef9f65312d (diff)
transitive Java deps for r8
The -libraryjars argument to r8 was missing transitive dependencies, and so complained when there were classes used in the program JAR which were not provided via libraries. This CL propagates transitive dependencies to the r8 command to reduce the warnings that are generated for missing classes. Bug: 242088131 Change-Id: Ifad7bc7c5d406e3de8d98ea963c97e88c84b45a1
Diffstat (limited to 'java/kotlin_test.go')
-rw-r--r--java/kotlin_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/java/kotlin_test.go b/java/kotlin_test.go
index 491ce2939..933fc5187 100644
--- a/java/kotlin_test.go
+++ b/java/kotlin_test.go
@@ -44,6 +44,10 @@ func TestKotlin(t *testing.T) {
kotlinStdlib := ctx.ModuleForTests("kotlin-stdlib", "android_common").
Output("turbine-combined/kotlin-stdlib.jar").Output
+ kotlinStdlibJdk7 := ctx.ModuleForTests("kotlin-stdlib-jdk7", "android_common").
+ Output("turbine-combined/kotlin-stdlib-jdk7.jar").Output
+ kotlinStdlibJdk8 := ctx.ModuleForTests("kotlin-stdlib-jdk8", "android_common").
+ Output("turbine-combined/kotlin-stdlib-jdk8.jar").Output
kotlinAnnotations := ctx.ModuleForTests("kotlin-annotations", "android_common").
Output("turbine-combined/kotlin-annotations.jar").Output
@@ -79,6 +83,16 @@ func TestKotlin(t *testing.T) {
fooJar.Inputs.Strings(), kotlinStdlib.String())
}
+ if !inList(kotlinStdlibJdk7.String(), fooJar.Inputs.Strings()) {
+ t.Errorf("foo jar inputs %v does not contain %v",
+ fooJar.Inputs.Strings(), kotlinStdlibJdk7.String())
+ }
+
+ if !inList(kotlinStdlibJdk8.String(), fooJar.Inputs.Strings()) {
+ t.Errorf("foo jar inputs %v does not contain %v",
+ fooJar.Inputs.Strings(), kotlinStdlibJdk8.String())
+ }
+
if !inList(kotlinAnnotations.String(), fooJar.Inputs.Strings()) {
t.Errorf("foo jar inputs %v does not contain %v",
fooJar.Inputs.Strings(), kotlinAnnotations.String())