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
diff --git a/java/java_test.go b/java/java_test.go
index 6b730da..c790342 100644
--- a/java/java_test.go
+++ b/java/java_test.go
@@ -97,6 +97,7 @@
"android_stubs_current",
"android_system_stubs_current",
"android_test_stubs_current",
+ "core.current.stubs",
"kotlin-stdlib",
}
@@ -106,6 +107,7 @@
name: "%s",
srcs: ["a.java"],
no_standard_libs: true,
+ sdk_version: "core_current",
system_modules: "core-system-modules",
}
`, extra)
@@ -212,9 +214,6 @@
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 @@
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 @@
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"},
},
{