From f19b9bb9819fbe36a05c31e193135a9b3b2e8388 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 26 Mar 2018 14:42:44 -0700 Subject: Use built SDK stubs Now that the SDK stubs are built in Soong, undo the hack that uses the prebuilt stubs. Fix the linktype checks to treat the various stubs libraries as the correct type, since they can't be annotated with sdk_version. Bug: 70351683 Bug: 77285514 Test: m checkbuild Change-Id: I5e870c34dd0ebc8ae3f888ec627da590c846a76f --- java/java_test.go | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'java/java_test.go') diff --git a/java/java_test.go b/java/java_test.go index 6b730dae1..c790342a1 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -97,6 +97,7 @@ func testContext(config android.Config, bp string, "android_stubs_current", "android_system_stubs_current", "android_test_stubs_current", + "core.current.stubs", "kotlin-stdlib", } @@ -106,6 +107,7 @@ func testContext(config android.Config, bp string, name: "%s", srcs: ["a.java"], no_standard_libs: true, + sdk_version: "core_current", system_modules: "core-system-modules", } `, extra) @@ -212,9 +214,6 @@ func moduleToPath(name string) string { return name case strings.HasSuffix(name, ".jar"): return name - case name == "android_stubs_current" || name == "android_system_stubs_current" || - name == "android_test_stubs_current": - return filepath.Join(buildDir, ".intermediates", name, "android_common", "javac", name+".jar") default: return filepath.Join(buildDir, ".intermediates", name, "android_common", "turbine-combined", name+".jar") } @@ -346,17 +345,15 @@ var classpathTestcases = []struct { name: "current", properties: `sdk_version: "current",`, - bootclasspath: []string{`""`}, + bootclasspath: []string{"android_stubs_current"}, system: "bootclasspath", // special value to tell 1.9 test to expect bootclasspath - classpath: []string{"prebuilts/sdk/current/android.jar"}, }, { name: "system_current", properties: `sdk_version: "system_current",`, - bootclasspath: []string{`""`}, + bootclasspath: []string{"android_system_stubs_current"}, system: "bootclasspath", // special value to tell 1.9 test to expect bootclasspath - classpath: []string{"prebuilts/sdk/system_current/android.jar"}, }, { @@ -370,17 +367,15 @@ var classpathTestcases = []struct { name: "test_current", properties: `sdk_version: "test_current",`, - bootclasspath: []string{`""`}, + bootclasspath: []string{"android_test_stubs_current"}, system: "bootclasspath", // special value to tell 1.9 test to expect bootclasspath - classpath: []string{"prebuilts/sdk/test_current/android.jar"}, }, { name: "core_current", properties: `sdk_version: "core_current",`, - bootclasspath: []string{`""`}, + bootclasspath: []string{"core.current.stubs"}, system: "bootclasspath", // special value to tell 1.9 test to expect bootclasspath - classpath: []string{"prebuilts/sdk/current/core.jar"}, }, { -- cgit v1.2.3-59-g8ed1b