Replace gensrcs with java_library to deprecate depfile in gensrcs
The depfile concept in Soong and Ninja isn't applicable in Bazel because Bazel requires listing the deps explicitly. This CL changes the module type from gensrcs to java_library with proto.type set to "stream". The end goal is to eventually deprecate depfile in gensrcs to ensure all gensrcs modules are convertable to Bazel. Test: CI Bug: 179452413 Change-Id: I921324e6260b7de6329a1ff445b6326643a9c526
This commit is contained in:
parent
d3a3af5c34
commit
6d8c1d7916
1 changed files with 11 additions and 23 deletions
|
|
@ -64,7 +64,6 @@ java_defaults {
|
|||
":framework-connectivity-sources",
|
||||
":net-utils-framework-common-srcs",
|
||||
":framework-connectivity-api-shared-srcs",
|
||||
":framework-connectivity-javastream-protos",
|
||||
],
|
||||
aidl: {
|
||||
generate_get_transaction_name: true,
|
||||
|
|
@ -90,6 +89,7 @@ java_defaults {
|
|||
"modules-utils-backgroundthread",
|
||||
"modules-utils-build",
|
||||
"modules-utils-preconditions",
|
||||
"framework-connectivity-javastream-protos",
|
||||
],
|
||||
libs: [
|
||||
"app-compat-annotations",
|
||||
|
|
@ -197,28 +197,16 @@ filegroup {
|
|||
visibility: ["//frameworks/base"],
|
||||
}
|
||||
|
||||
gensrcs {
|
||||
java_library {
|
||||
name: "framework-connectivity-javastream-protos",
|
||||
depfile: true,
|
||||
|
||||
tools: [
|
||||
"aprotoc",
|
||||
"protoc-gen-javastream",
|
||||
"soong_zip",
|
||||
proto: {
|
||||
type: "stream",
|
||||
},
|
||||
srcs: [":framework-connectivity-protos"],
|
||||
installable: false,
|
||||
sdk_version: "module_current",
|
||||
min_sdk_version: "30",
|
||||
apex_available: [
|
||||
"com.android.tethering",
|
||||
],
|
||||
|
||||
cmd: "mkdir -p $(genDir)/$(in) " +
|
||||
"&& $(location aprotoc) " +
|
||||
" --plugin=$(location protoc-gen-javastream) " +
|
||||
" --dependency_out=$(depfile) " +
|
||||
" --javastream_out=$(genDir)/$(in) " +
|
||||
" -Iexternal/protobuf/src " +
|
||||
" -I . " +
|
||||
" $(in) " +
|
||||
"&& $(location soong_zip) -jar -o $(out) -C $(genDir)/$(in) -D $(genDir)/$(in)",
|
||||
|
||||
srcs: [
|
||||
":framework-connectivity-protos",
|
||||
],
|
||||
output_extension: "srcjar",
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue