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
This commit is contained in:
Remi NGUYEN VAN 2022-03-30 18:51:41 +09:00
commit 86bbfe9271
3 changed files with 28 additions and 61 deletions

View file

@ -22,6 +22,17 @@ package {
// 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 @@ java_library {
// 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 @@ java_library {
"//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__",
],
}

View file

@ -59,48 +59,6 @@ filegroup {
],
}
// 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 @@ filegroup {
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",

View file

@ -24,8 +24,7 @@ android_test {
name: "EthernetServiceTests",
srcs: [
":ethernet-service-updatable-sources",
":services.connectivity-ethernet-sources",
":ethernet-service-test-sources",
"java/**/*.java",
],