Merge "Don't use AppsDefaultVersionName for framework-res.apk"
am: eedc9484ab
Change-Id: I27fa175b4e1f447d01c05ab1262193dbc0952deb
This commit is contained in:
committed by
android-build-merger
commit
4fe12e40c3
11
java/aar.go
11
java/aar.go
@@ -143,7 +143,16 @@ func (a *aapt) aapt2Flags(ctx android.ModuleContext, sdkVersion string) (flags [
|
||||
}
|
||||
|
||||
if !hasVersionName {
|
||||
versionName := proptools.NinjaEscape([]string{ctx.Config().AppsDefaultVersionName()})[0]
|
||||
var versionName string
|
||||
if ctx.ModuleName() == "framework-res" {
|
||||
// Some builds set AppsDefaultVersionName() to include the build number ("O-123456"). aapt2 copies the
|
||||
// version name of framework-res into app manifests as compileSdkVersionCodename, which confuses things
|
||||
// if it contains the build number. Use the DefaultAppTargetSdk instead.
|
||||
versionName = ctx.Config().DefaultAppTargetSdk()
|
||||
} else {
|
||||
versionName = ctx.Config().AppsDefaultVersionName()
|
||||
}
|
||||
versionName = proptools.NinjaEscape([]string{versionName})[0]
|
||||
linkFlags = append(linkFlags, "--version-name ", versionName)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user