Fix apps build
Fix two problems with Soong's aapt2 rules that occur when TARGET_BUILD_APPS is set. Fix escaping the values passed to --min-sdk-version, they are sometimes P-$$(cat out/build_number.txt). Also use the correct path to the aapt2 prebuilt. Bug: 69917341 Test: m TARGET_PRODUCT=full TARGET_BUILD_VARIANT=userdebug TARGET_BUILD_APPS=Camera2 Change-Id: I8660a62c4a87a74e0ac1b9d03d67103af93a0cbe
This commit is contained in:
@@ -254,7 +254,7 @@ func (a *AndroidApp) aapt2Flags(ctx android.ModuleContext) (flags []string, deps
|
||||
sdkVersion := String(a.deviceProperties.Sdk_version)
|
||||
switch sdkVersion {
|
||||
case "", "current", "system_current", "test_current":
|
||||
sdkVersion = ctx.Config().AppsDefaultVersionName()
|
||||
sdkVersion = proptools.NinjaEscape([]string{ctx.Config().AppsDefaultVersionName()})[0]
|
||||
}
|
||||
|
||||
linkFlags = append(linkFlags, "--min-sdk-version "+sdkVersion)
|
||||
|
Reference in New Issue
Block a user