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
diff --git a/service/Android.bp b/service/Android.bp
index 94061a4..b727890 100644
--- a/service/Android.bp
+++ b/service/Android.bp
@@ -310,7 +310,7 @@
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 13e1dc0..f4ed9e4 100644
--- a/staticlibs/testutils/Android.bp
+++ b/staticlibs/testutils/Android.bp
@@ -103,7 +103,7 @@
"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 920492f..bb1009b 100644
--- a/tests/common/Android.bp
+++ b/tests/common/Android.bp
@@ -61,7 +61,7 @@
// 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 97be91a..0ac9ce1 100644
--- a/tests/cts/hostside/Android.bp
+++ b/tests/cts/hostside/Android.bp
@@ -56,7 +56,7 @@
"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 40aa1e4..949be85 100644
--- a/tests/cts/multidevices/Android.bp
+++ b/tests/cts/multidevices/Android.bp
@@ -37,7 +37,7 @@
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 726e504..70a3655 100644
--- a/tests/deflake/Android.bp
+++ b/tests/deflake/Android.bp
@@ -40,7 +40,7 @@
"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 6892a42..9edf9bd 100644
--- a/tests/unit/Android.bp
+++ b/tests/unit/Android.bp
@@ -114,7 +114,7 @@
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 2c2ed14..1351eb7 100644
--- a/tools/Android.bp
+++ b/tools/Android.bp
@@ -81,7 +81,7 @@
"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",