From a3b0b0a27628fcd2b84f6b93eb920c05134d124e Mon Sep 17 00:00:00 2001 From: Stefano Duo Date: Wed, 21 Jun 2023 16:51:23 +0100 Subject: [PATCH] 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 --- Cronet/tests/mts/Android.bp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Cronet/tests/mts/Android.bp b/Cronet/tests/mts/Android.bp index 4e4251cfea..63905c83b1 100644 --- a/Cronet/tests/mts/Android.bp +++ b/Cronet/tests/mts/Android.bp @@ -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",