Merge changes from topic "bazel_framework_res" into main am: 641b62b205
am: b0e61183f3
am: f1a3d7a303
am: ae9096771c
am: bb53a4fc75
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2720593 Change-Id: I9a9b31f51bced57a22db829cdf0dee58fd11f200 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
12
java/aar.go
12
java/aar.go
@@ -1225,6 +1225,7 @@ func AARImportFactory() android.Module {
|
||||
type bazelAapt struct {
|
||||
Manifest bazel.Label
|
||||
Resource_files bazel.LabelListAttribute
|
||||
Resource_zips bazel.LabelListAttribute
|
||||
Assets_dir bazel.StringAttribute
|
||||
Assets bazel.LabelListAttribute
|
||||
}
|
||||
@@ -1269,9 +1270,20 @@ func (a *aapt) convertAaptAttrsWithBp2Build(ctx android.Bp2buildMutatorContext)
|
||||
assets = bazel.MakeLabelList(android.RootToModuleRelativePaths(ctx, androidResourceGlob(ctx, dir)))
|
||||
|
||||
}
|
||||
var resourceZips bazel.LabelList
|
||||
if len(a.aaptProperties.Resource_zips) > 0 {
|
||||
if ctx.ModuleName() == "framework-res" {
|
||||
resourceZips = android.BazelLabelForModuleSrc(ctx, a.aaptProperties.Resource_zips)
|
||||
} else {
|
||||
//TODO: b/301593550 - Implement support for this
|
||||
ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_PROPERTY_UNSUPPORTED, "resource_zips")
|
||||
return &bazelAapt{}, false
|
||||
}
|
||||
}
|
||||
return &bazelAapt{
|
||||
android.BazelLabelForModuleSrcSingle(ctx, manifest),
|
||||
bazel.MakeLabelListAttribute(resourceFiles),
|
||||
bazel.MakeLabelListAttribute(resourceZips),
|
||||
assetsDir,
|
||||
bazel.MakeLabelListAttribute(assets),
|
||||
}, true
|
||||
|
Reference in New Issue
Block a user