Merge "Always use "${codename}.${sha}" if UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true" into rvc-dev am: 307dd9f4a5
Change-Id: Ieef51877b11ba1637615245ab617e8f7a88fb128
This commit is contained in:
@@ -99,8 +99,8 @@ func manifestFixer(ctx android.ModuleContext, manifest android.Path, sdkContext
|
||||
if err != nil {
|
||||
ctx.ModuleErrorf("invalid targetSdkVersion: %s", err)
|
||||
}
|
||||
if UseApiFingerprint(ctx, targetSdkVersion) {
|
||||
targetSdkVersion += fmt.Sprintf(".$$(cat %s)", ApiFingerprintPath(ctx).String())
|
||||
if UseApiFingerprint(ctx) {
|
||||
targetSdkVersion = ctx.Config().PlatformSdkCodename() + fmt.Sprintf(".$$(cat %s)", ApiFingerprintPath(ctx).String())
|
||||
deps = append(deps, ApiFingerprintPath(ctx))
|
||||
}
|
||||
|
||||
@@ -108,8 +108,8 @@ func manifestFixer(ctx android.ModuleContext, manifest android.Path, sdkContext
|
||||
if err != nil {
|
||||
ctx.ModuleErrorf("invalid minSdkVersion: %s", err)
|
||||
}
|
||||
if UseApiFingerprint(ctx, minSdkVersion) {
|
||||
minSdkVersion += fmt.Sprintf(".$$(cat %s)", ApiFingerprintPath(ctx).String())
|
||||
if UseApiFingerprint(ctx) {
|
||||
minSdkVersion = ctx.Config().PlatformSdkCodename() + fmt.Sprintf(".$$(cat %s)", ApiFingerprintPath(ctx).String())
|
||||
deps = append(deps, ApiFingerprintPath(ctx))
|
||||
}
|
||||
|
||||
|
@@ -50,9 +50,8 @@ type sdkContext interface {
|
||||
targetSdkVersion() sdkSpec
|
||||
}
|
||||
|
||||
func UseApiFingerprint(ctx android.BaseModuleContext, v string) bool {
|
||||
if v == ctx.Config().PlatformSdkCodename() &&
|
||||
ctx.Config().UnbundledBuild() &&
|
||||
func UseApiFingerprint(ctx android.BaseModuleContext) bool {
|
||||
if ctx.Config().UnbundledBuild() &&
|
||||
!ctx.Config().UnbundledBuildUsePrebuiltSdks() &&
|
||||
ctx.Config().IsEnvTrue("UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT") {
|
||||
return true
|
||||
|
Reference in New Issue
Block a user