Cronet's MTS: don't depend on platform Cronet

MTS tests shouldn't load Cronet from the platform (through the
bootclasspath). They should instead bundle it directly.

Things still need to be jarjar'ed to avoid clashing with classnames on
the bootclasspath (which would otherwise take precedence). Though, this
will no longer be needed once the android.net.http -> org.chromium.net
wrapper lands (MTS will then target org.chromium.net directly, which
isn't exposed through the bootclasspath).

Bug: 288886953
Test: m & th
Change-Id: I1533b357889e13e5e1c739c8a8419d21b10face3
This commit is contained in:
Stefano Duo
2023-06-21 16:51:23 +01:00
parent b9547712f6
commit a3b0b0a276

View File

@@ -38,7 +38,11 @@ java_genrule {
// tests need to inherit the NetHttpTests manifest.
android_library {
name: "NetHttpTestsLibPreJarJar",
static_libs: ["cronet_java_tests"],
static_libs: [
"cronet_aml_api_java",
"cronet_aml_java__testing",
"cronet_java_tests",
],
sdk_version: "module_current",
min_sdk_version: "30",
}
@@ -51,7 +55,8 @@ android_test {
static_libs: ["NetHttpTestsLibPreJarJar"],
jarjar_rules: ":net-http-test-jarjar-rules",
jni_libs: [
"cronet_aml_components_cronet_android_cronet_tests__testing"
"cronet_aml_components_cronet_android_cronet__testing",
"cronet_aml_components_cronet_android_cronet_tests__testing",
],
test_suites: [
"general-tests",