From 9ff8f4c81b1acd9cabe75b0d62d96c2fe684e357 Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Tue, 22 Oct 2024 16:31:00 -0700 Subject: [PATCH] Remove dependencies on the 1-variant fallback When adding a dependencies, if the variants don't match, but the dependency only has 1 variant anyways, soong will always use that variant. This makes it hard to add new variants to soong, because the 1-variant fallback stops being used and you start getting missing variant errors. Make changes to bp files such that all dependencies correctly specify the variant to use. Bug: 372091092 Flag: EXEMPT refactor Test: m nothing Change-Id: I8d4f59044f268088b44357d27322abbdcdc3001c --- service/Android.bp | 2 +- staticlibs/testutils/Android.bp | 2 +- tests/common/Android.bp | 2 +- tests/cts/hostside/Android.bp | 2 +- tests/cts/multidevices/Android.bp | 2 +- tests/deflake/Android.bp | 2 +- tests/unit/Android.bp | 2 +- tools/Android.bp | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/service/Android.bp b/service/Android.bp index 94061a46e1..b7278908d5 100644 --- a/service/Android.bp +++ b/service/Android.bp @@ -310,7 +310,7 @@ java_library_static { apex_available: ["com.android.tethering"], } -genrule { +java_genrule { name: "connectivity-jarjar-rules", defaults: ["jarjar-rules-combine-defaults"], srcs: [ diff --git a/staticlibs/testutils/Android.bp b/staticlibs/testutils/Android.bp index 13e1dc06f9..f4ed9e4224 100644 --- a/staticlibs/testutils/Android.bp +++ b/staticlibs/testutils/Android.bp @@ -103,7 +103,7 @@ java_test_host { "mcts-wifi", "mcts-dnsresolver", ], - data: [":ConnectivityTestPreparer"], + device_common_data: [":ConnectivityTestPreparer"], } python_library_host { diff --git a/tests/common/Android.bp b/tests/common/Android.bp index 920492f376..bb1009b44b 100644 --- a/tests/common/Android.bp +++ b/tests/common/Android.bp @@ -61,7 +61,7 @@ java_library { // Combine Connectivity, NetworkStack and Tethering jarjar rules for coverage target. // The jarjar files are simply concatenated in the order specified in srcs. // jarjar stops at the first matching rule, so order of concatenation affects the output. -genrule { +java_genrule { name: "ConnectivityCoverageJarJarRules", defaults: ["jarjar-rules-combine-defaults"], srcs: [ diff --git a/tests/cts/hostside/Android.bp b/tests/cts/hostside/Android.bp index 97be91a837..0ac9ce194e 100644 --- a/tests/cts/hostside/Android.bp +++ b/tests/cts/hostside/Android.bp @@ -56,7 +56,7 @@ java_test_host { "mts-tethering", "sts", ], - data: [ + device_common_data: [ ":CtsHostsideNetworkTestsApp", ":CtsHostsideNetworkTestsApp2", ":CtsHostsideNetworkCapTestsAppWithoutProperty", diff --git a/tests/cts/multidevices/Android.bp b/tests/cts/multidevices/Android.bp index 40aa1e4125..949be85d08 100644 --- a/tests/cts/multidevices/Android.bp +++ b/tests/cts/multidevices/Android.bp @@ -37,7 +37,7 @@ python_test_host { test_options: { unit_test: false, }, - data: [ + device_common_data: [ // Package the snippet with the mobly test ":connectivity_multi_devices_snippet", ], diff --git a/tests/deflake/Android.bp b/tests/deflake/Android.bp index 726e504341..70a3655039 100644 --- a/tests/deflake/Android.bp +++ b/tests/deflake/Android.bp @@ -40,7 +40,7 @@ java_test_host { "kotlin-test", "net-host-tests-utils", ], - data: [":FrameworksNetTests"], + device_common_data: [":FrameworksNetTests"], test_suites: ["device-tests"], // It will get build error if just set enabled to true. It fails with "windows_common" // depends on some disabled modules that are used by this test and it looks like set diff --git a/tests/unit/Android.bp b/tests/unit/Android.bp index 6892a42299..9edf9bd355 100644 --- a/tests/unit/Android.bp +++ b/tests/unit/Android.bp @@ -114,7 +114,7 @@ android_library { visibility: ["//packages/modules/Connectivity/tests:__subpackages__"], } -genrule { +java_genrule { name: "frameworks-net-tests-jarjar-rules", defaults: ["jarjar-rules-combine-defaults"], srcs: [ diff --git a/tools/Android.bp b/tools/Android.bp index 2c2ed148ae..1351eb76dc 100644 --- a/tools/Android.bp +++ b/tools/Android.bp @@ -81,7 +81,7 @@ python_test_host { "gen_jarjar.py", "gen_jarjar_test.py", ], - data: [ + device_common_data: [ "testdata/test-jarjar-excludes.txt", // txt with Test classes to test they aren't included when added to jarjar excludes "testdata/test-jarjar-excludes-testclass.txt",