Add environment variable UNBUNDLED_BUILD_TARGET_SDK_WITH_DESSERT_SHA
UNBUNDLED_BUILD_TARGET_SDK_WITH_DESSERT_SHA enables user to specify ${codename}.${sha} as min_sdk_version and target_sdk_version in order to support mainline train building into android build. Test: TH Bug: 295905124 Change-Id: I032d464aaa7314520f98b8eafa53d962940075ce
This commit is contained in:
@@ -152,9 +152,10 @@ func ManifestFixer(ctx android.ModuleContext, manifest android.Path,
|
||||
if params.SdkContext != nil {
|
||||
targetSdkVersion := targetSdkVersionForManifestFixer(ctx, params)
|
||||
|
||||
if UseApiFingerprint(ctx) && ctx.ModuleName() != "framework-res" {
|
||||
targetSdkVersion = ctx.Config().PlatformSdkCodename() + fmt.Sprintf(".$$(cat %s)", ApiFingerprintPath(ctx).String())
|
||||
deps = append(deps, ApiFingerprintPath(ctx))
|
||||
if useApiFingerprint, fingerprintTargetSdkVersion, fingerprintDeps :=
|
||||
UseApiFingerprint(ctx); useApiFingerprint && ctx.ModuleName() != "framework-res" {
|
||||
targetSdkVersion = fingerprintTargetSdkVersion
|
||||
deps = append(deps, fingerprintDeps)
|
||||
}
|
||||
|
||||
args = append(args, "--targetSdkVersion ", targetSdkVersion)
|
||||
@@ -169,9 +170,10 @@ func ManifestFixer(ctx android.ModuleContext, manifest android.Path,
|
||||
ctx.ModuleErrorf("invalid ReplaceMaxSdkVersionPlaceholder: %s", err)
|
||||
}
|
||||
|
||||
if UseApiFingerprint(ctx) && ctx.ModuleName() != "framework-res" {
|
||||
minSdkVersion = ctx.Config().PlatformSdkCodename() + fmt.Sprintf(".$$(cat %s)", ApiFingerprintPath(ctx).String())
|
||||
deps = append(deps, ApiFingerprintPath(ctx))
|
||||
if useApiFingerprint, fingerprintMinSdkVersion, fingerprintDeps :=
|
||||
UseApiFingerprint(ctx); useApiFingerprint && ctx.ModuleName() != "framework-res" {
|
||||
minSdkVersion = fingerprintMinSdkVersion
|
||||
deps = append(deps, fingerprintDeps)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user