Merge "Expand regex for likely aidl filegroups" into main am: e88fe1fb92
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2768335 Change-Id: Iebfd7023a546eacccdad6f7972e3ff5d6b9e6943 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -50,7 +50,7 @@ var (
|
|||||||
// ignoring case, checks for proto or protos as an independent word in the name, whether at the
|
// ignoring case, checks for proto or protos as an independent word in the name, whether at the
|
||||||
// beginning, end, or middle. e.g. "proto.foo", "bar-protos", "baz_proto_srcs" would all match
|
// beginning, end, or middle. e.g. "proto.foo", "bar-protos", "baz_proto_srcs" would all match
|
||||||
filegroupLikelyProtoPattern = regexp.MustCompile("(?i)(^|[^a-z])proto(s)?([^a-z]|$)")
|
filegroupLikelyProtoPattern = regexp.MustCompile("(?i)(^|[^a-z])proto(s)?([^a-z]|$)")
|
||||||
filegroupLikelyAidlPattern = regexp.MustCompile("(?i)(^|[^a-z])aidl([^a-z]|$)")
|
filegroupLikelyAidlPattern = regexp.MustCompile("(?i)(^|[^a-z])aidl(s)?([^a-z]|$)")
|
||||||
|
|
||||||
ProtoSrcLabelPartition = bazel.LabelPartition{
|
ProtoSrcLabelPartition = bazel.LabelPartition{
|
||||||
Extensions: []string{".proto"},
|
Extensions: []string{".proto"},
|
||||||
|
@@ -567,12 +567,20 @@ filegroup {
|
|||||||
"b.aidl",
|
"b.aidl",
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
filegroup {
|
||||||
|
name: "aidls_files",
|
||||||
|
srcs: [
|
||||||
|
"a.aidl",
|
||||||
|
"b.aidl",
|
||||||
|
],
|
||||||
|
}
|
||||||
java_library {
|
java_library {
|
||||||
name: "example_lib",
|
name: "example_lib",
|
||||||
srcs: [
|
srcs: [
|
||||||
"a.java",
|
"a.java",
|
||||||
"b.java",
|
"b.java",
|
||||||
":aidl_files",
|
":aidl_files",
|
||||||
|
":aidls_files",
|
||||||
":random_other_files",
|
":random_other_files",
|
||||||
],
|
],
|
||||||
sdk_version: "current",
|
sdk_version: "current",
|
||||||
@@ -583,11 +591,21 @@ java_library {
|
|||||||
"srcs": `[
|
"srcs": `[
|
||||||
"a.aidl",
|
"a.aidl",
|
||||||
"b.aidl",
|
"b.aidl",
|
||||||
|
]`,
|
||||||
|
"tags": `["apex_available=//apex_available:anyapex"]`,
|
||||||
|
}),
|
||||||
|
MakeBazelTargetNoRestrictions("aidl_library", "aidls_files", AttrNameToString{
|
||||||
|
"srcs": `[
|
||||||
|
"a.aidl",
|
||||||
|
"b.aidl",
|
||||||
]`,
|
]`,
|
||||||
"tags": `["apex_available=//apex_available:anyapex"]`,
|
"tags": `["apex_available=//apex_available:anyapex"]`,
|
||||||
}),
|
}),
|
||||||
MakeBazelTarget("java_aidl_library", "example_lib_java_aidl_library", AttrNameToString{
|
MakeBazelTarget("java_aidl_library", "example_lib_java_aidl_library", AttrNameToString{
|
||||||
"deps": `[":aidl_files"]`,
|
"deps": `[
|
||||||
|
":aidl_files",
|
||||||
|
":aidls_files",
|
||||||
|
]`,
|
||||||
}),
|
}),
|
||||||
MakeBazelTarget("java_library", "example_lib", AttrNameToString{
|
MakeBazelTarget("java_library", "example_lib", AttrNameToString{
|
||||||
"deps": `[":example_lib_java_aidl_library"]`,
|
"deps": `[":example_lib_java_aidl_library"]`,
|
||||||
|
Reference in New Issue
Block a user