aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpandan Das <spandandas@google.com>2023-04-27 01:52:54 +0000
committerCherrypicker Worker <android-build-cherrypicker-worker@google.com>2023-06-06 14:09:39 +0000
commit1487d3a350538efd795d41e681242d363bdbc2f9 (patch)
tree299efbccc7f71daa67253b5d436c4bcdfaeddf9e
parent0c0ea85be994cadd3cf05e26abaa366f5ca5f145 (diff)
downloadaidl-1487d3a350538efd795d41e681242d363bdbc2f9.tar.gz
Ignore test apexes from bp2build generated tags
Soong does not enforce apex_available on the contents of test apex. To prevent special-casing test apexes in the apex validation aspect in Bazel, drop the test apexes from the tags altogether. (The core problem I am trying to solve is making sure that stub libraries in Bazel have a single apex available. apex validation happens to be a nice side benefit) Bug: 277651159 Test: TH (cherry picked from https://android-review.googlesource.com/q/commit:794285d83aa3ca309c852642d201845f155c57ac) Merged-In: Ice6323847c8642bf3790b0d6945120623e558133 Change-Id: Ice6323847c8642bf3790b0d6945120623e558133
-rw-r--r--build/aidl_interface.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/build/aidl_interface.go b/build/aidl_interface.go
index 1f0fef8a..0330ed1e 100644
--- a/build/aidl_interface.go
+++ b/build/aidl_interface.go
@@ -1212,19 +1212,19 @@ func (i *aidlInterface) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
javaConfig = &javaConfigAttributes{}
javaConfig.Enabled = true
javaConfig.Min_sdk_version = i.minSdkVersion(langJava)
- javaConfig.Tags = android.ConvertApexAvailableToTags(i.properties.Backend.Java.Apex_available)
+ javaConfig.Tags = android.ConvertApexAvailableToTagsWithoutTestApexes(ctx, i.properties.Backend.Java.Apex_available)
}
if i.shouldGenerateCppBackend() {
cppConfig = &cppConfigAttributes{}
cppConfig.Enabled = true
cppConfig.Min_sdk_version = i.minSdkVersion(langCpp)
- cppConfig.Tags = android.ConvertApexAvailableToTags(i.properties.Backend.Cpp.Apex_available)
+ cppConfig.Tags = android.ConvertApexAvailableToTagsWithoutTestApexes(ctx, i.properties.Backend.Cpp.Apex_available)
}
if i.shouldGenerateNdkBackend() {
ndkConfig = &ndkConfigAttributes{}
ndkConfig.Enabled = true
ndkConfig.Min_sdk_version = i.minSdkVersion(langNdk)
- ndkConfig.Tags = android.ConvertApexAvailableToTags(i.properties.Backend.Ndk.Apex_available)
+ ndkConfig.Tags = android.ConvertApexAvailableToTagsWithoutTestApexes(ctx, i.properties.Backend.Ndk.Apex_available)
}
imports := getBazelLabelListForImports(ctx, i.properties.Imports)