Remove connectivity-tiramisu-updatable-sources
The filegroup is now unnecessary as files are all in the service-t/src
directory.
This change allows building all sources including ethernet by
referencing src/**. This is done by using a general filegroup
service-connectivity-tiramisu-sources, so that branches that cannot
build the T+ code can change its contents without introducing merge
conflicts in the rest of the build rules.
Also change visibility rules to allow building the moved ethernet code,
and add a filegroup to allow building its tests.
Bug: 222234190
Test: TH
Merged-In: I770bf8db3f4c18467934eb2184f5dc2408fc28ec
Merged-In: I3e5df1bd44defbb9dd0c382c625a21e176368f2a
Change-Id: I8f23a45800b1086cc5a765fd24d734ca82c339a8
diff --git a/service-t/Android.bp b/service-t/Android.bp
index 50dd995..0beb4c8 100644
--- a/service-t/Android.bp
+++ b/service-t/Android.bp
@@ -22,6 +22,17 @@
// Include build rules from Sources.bp
build = ["Sources.bp"]
+filegroup {
+ name: "service-connectivity-tiramisu-sources",
+ srcs: [
+ "src/**/*.java",
+ ],
+ visibility: ["//visibility:private"],
+}
+// The above filegroup can be used to specify different sources depending
+// on the branch, while minimizing merge conflicts in the rest of the
+// build rules.
+
// This builds T+ services depending on framework-connectivity-t
// hidden symbols separately from the S+ services, to ensure that S+
// services cannot accidentally depend on T+ hidden symbols from
@@ -32,9 +43,7 @@
// TODO(b/210962470): Bump this to at least S, and then T.
min_sdk_version: "30",
srcs: [
- "src/**/*.java",
- ":ethernet-service-updatable-sources",
- ":services.connectivity-tiramisu-updatable-sources",
+ ":service-connectivity-tiramisu-sources",
],
libs: [
"framework-annotations-lib",
@@ -63,3 +72,18 @@
"//packages/modules/IPsec/tests/iketests",
],
}
+
+// Ethernet related libraries.
+// TODO: remove when ethernet tests are merged into connectivity tests
+filegroup {
+ name: "ethernet-service-test-sources",
+ srcs: [
+ "src/com/android/server/ethernet/**/*.java",
+ "src/com/android/server/net/DelayedDiskWrite.java",
+ "src/com/android/server/net/IpConfigStore.java",
+ ],
+ path: "src",
+ visibility: [
+ "//packages/modules/Connectivity/tests:__subpackages__",
+ ],
+}
diff --git a/service-t/Sources.bp b/service-t/Sources.bp
index 04866fb..4e669b6 100644
--- a/service-t/Sources.bp
+++ b/service-t/Sources.bp
@@ -59,48 +59,6 @@
],
}
-// Nsd related libraries.
-
-filegroup {
- name: "services.connectivity-nsd-sources",
- srcs: [
- "src/com/android/server/INativeDaemon*.java",
- "src/com/android/server/NativeDaemon*.java",
- "src/com/android/server/Nsd*.java",
- ],
- path: "src",
- visibility: [
- "//visibility:private",
- ],
-}
-
-// IpSec related libraries.
-
-filegroup {
- name: "services.connectivity-ipsec-sources",
- srcs: [
- "src/com/android/server/IpSecService.java",
- ],
- path: "src",
- visibility: [
- "//visibility:private",
- ],
-}
-
-// Ethernet related libraries.
-
-filegroup {
- name: "services.connectivity-ethernet-sources",
- srcs: [
- "src/com/android/server/net/DelayedDiskWrite.java",
- "src/com/android/server/net/IpConfigStore.java",
- ],
- path: "src",
- visibility: [
- "//frameworks/opt/net/ethernet/tests",
- ],
-}
-
// Connectivity-T common libraries.
// TODO: remove this empty filegroup.
@@ -111,20 +69,6 @@
visibility: ["//frameworks/base/services/core"],
}
-filegroup {
- name: "services.connectivity-tiramisu-updatable-sources",
- srcs: [
- ":services.connectivity-ethernet-sources",
- ":services.connectivity-ipsec-sources",
- ":services.connectivity-netstats-sources",
- ":services.connectivity-nsd-sources",
- ],
- path: "src",
- visibility: [
- "//packages/modules/Connectivity:__subpackages__",
- ],
-}
-
cc_library_shared {
name: "libcom_android_net_module_util_jni",
min_sdk_version: "30",
diff --git a/tests/ethernet/Android.bp b/tests/ethernet/Android.bp
index 6cfebdc..8342490 100644
--- a/tests/ethernet/Android.bp
+++ b/tests/ethernet/Android.bp
@@ -24,8 +24,7 @@
name: "EthernetServiceTests",
srcs: [
- ":ethernet-service-updatable-sources",
- ":services.connectivity-ethernet-sources",
+ ":ethernet-service-test-sources",
"java/**/*.java",
],