Add config java_proto build target for com.android.profiling
This adds a new target that's like "perfetto_config_java_protos", but:
* It is apex available to "com.android.profiling".
* It has `sdk_version "system_server_current"`.
Change-Id: I2d7fcb9558d8627ec77513cc751e8efbce3b1583
diff --git a/Android.bp b/Android.bp
index ee7f589..c46b914 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1318,8 +1318,8 @@
}
// GN: [//protos/perfetto/config:source_set]
-java_library {
- name: "perfetto_config_java_protos",
+filegroup {
+ name: "perfetto_config_filegroup_proto",
srcs: [
"protos/perfetto/common/android_energy_consumer_descriptor.proto",
"protos/perfetto/common/android_log_constants.proto",
@@ -1375,10 +1375,6 @@
"protos/perfetto/config/trace_config.proto",
"protos/perfetto/config/track_event/track_event_config.proto",
],
- proto: {
- type: "lite",
- canonical_path_from_root: false,
- },
}
// GN: //test/cts:perfetto_cts_deps
@@ -17265,6 +17261,38 @@
output_extension: "srcjar",
}
+java_library {
+ name: "perfetto_config_java_protos",
+ srcs: [
+ ":perfetto_config_filegroup_proto",
+ ],
+ static_libs: [
+ "libprotobuf-java-lite",
+ ],
+ proto: {
+ type: "lite",
+ canonical_path_from_root: false,
+ },
+}
+
+java_library {
+ name: "perfetto_config_java_protos_system_server_current",
+ srcs: [
+ ":perfetto_config_filegroup_proto",
+ ],
+ static_libs: [
+ "libprotobuf-java-lite",
+ ],
+ proto: {
+ type: "lite",
+ canonical_path_from_root: false,
+ },
+ sdk_version: "system_server_current",
+ apex_available: [
+ "com.android.profiling",
+ ],
+}
+
prebuilt_etc {
name: "perfetto_persistent_cfg.pbtxt",
filename: "persistent_cfg.pbtxt",
diff --git a/Android.bp.extras b/Android.bp.extras
index 75d3a81..56cfcdd 100644
--- a/Android.bp.extras
+++ b/Android.bp.extras
@@ -198,6 +198,38 @@
output_extension: "srcjar",
}
+java_library {
+ name: "perfetto_config_java_protos",
+ srcs: [
+ ":perfetto_config_filegroup_proto",
+ ],
+ static_libs: [
+ "libprotobuf-java-lite",
+ ],
+ proto: {
+ type: "lite",
+ canonical_path_from_root: false,
+ },
+}
+
+java_library {
+ name: "perfetto_config_java_protos_system_server_current",
+ srcs: [
+ ":perfetto_config_filegroup_proto",
+ ],
+ static_libs: [
+ "libprotobuf-java-lite",
+ ],
+ proto: {
+ type: "lite",
+ canonical_path_from_root: false,
+ },
+ sdk_version: "system_server_current",
+ apex_available: [
+ "com.android.profiling",
+ ],
+}
+
prebuilt_etc {
name: "perfetto_persistent_cfg.pbtxt",
filename: "persistent_cfg.pbtxt",
diff --git a/tools/gen_android_bp b/tools/gen_android_bp
index a0d92ed..2aa0b7f 100755
--- a/tools/gen_android_bp
+++ b/tools/gen_android_bp
@@ -137,7 +137,7 @@
]
},
'config': {
- 'types': ['lite'],
+ 'types': ['filegroup'],
'targets': [
'//protos/perfetto/config:source_set',
]