Revert "Revert "Allow codename.fingerprint format for minSdkVersion""
This reverts commit 230e241f58
.
Reason for revert: This is a revert of a revert. Downstream problem has been fixed and have been validated locally and via Forrest build.
Change-Id: I89c51d25b3adb818ea44a983d0ac681a88790d8c
This commit is contained in:
@@ -376,15 +376,17 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) {
|
||||
}
|
||||
|
||||
targetSdkVersion := ctx.Config().DefaultAppTargetSdk()
|
||||
if targetSdkVersion == ctx.Config().PlatformSdkCodename() &&
|
||||
ctx.Config().UnbundledBuild() &&
|
||||
!ctx.Config().UnbundledBuildUsePrebuiltSdks() &&
|
||||
ctx.Config().IsEnvTrue("UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT") {
|
||||
apiFingerprint := java.ApiFingerprintPath(ctx)
|
||||
targetSdkVersion += fmt.Sprintf(".$$(cat %s)", apiFingerprint.String())
|
||||
implicitInputs = append(implicitInputs, apiFingerprint)
|
||||
minSdkVersion := ctx.Config().DefaultAppTargetSdk()
|
||||
if java.UseApiFingerprint(ctx, targetSdkVersion) {
|
||||
targetSdkVersion += fmt.Sprintf(".$$(cat %s)", java.ApiFingerprintPath(ctx).String())
|
||||
implicitInputs = append(implicitInputs, java.ApiFingerprintPath(ctx))
|
||||
}
|
||||
if java.UseApiFingerprint(ctx, minSdkVersion) {
|
||||
minSdkVersion += fmt.Sprintf(".$$(cat %s)", java.ApiFingerprintPath(ctx).String())
|
||||
implicitInputs = append(implicitInputs, java.ApiFingerprintPath(ctx))
|
||||
}
|
||||
optFlags = append(optFlags, "--target_sdk_version "+targetSdkVersion)
|
||||
optFlags = append(optFlags, "--min_sdk_version "+minSdkVersion)
|
||||
|
||||
noticeFile := a.buildNoticeFile(ctx, a.Name()+suffix)
|
||||
if noticeFile.Valid() {
|
||||
|
Reference in New Issue
Block a user