diff options
author | Artur Satayev <satayev@google.com> | 2020-04-28 12:05:38 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-04-28 12:05:38 +0000 |
commit | 785afdb04cd300e5fa34afbad37476a64933289f (patch) | |
tree | ea1473b78a00e22c4f6595764da625e2dfb187bf /java/app.go | |
parent | 0f4c8686165b975a01fa44544547a2f636fc81eb (diff) | |
parent | 11962107189926357839510be5ed583e093f363a (diff) | |
download | build_soong-785afdb04cd300e5fa34afbad37476a64933289f.tar.gz build_soong-785afdb04cd300e5fa34afbad37476a64933289f.tar.bz2 build_soong-785afdb04cd300e5fa34afbad37476a64933289f.zip |
Merge "Do not allow updatable apps without min_sdk_version." into rvc-dev
Diffstat (limited to 'java/app.go')
-rwxr-xr-x | java/app.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/java/app.go b/java/app.go index 0ec2502b..f8123356 100755 --- a/java/app.go +++ b/java/app.go @@ -112,7 +112,9 @@ type appProperties struct { IsCoverageVariant bool `blueprint:"mutated"` // Whether this app is considered mainline updatable or not. When set to true, this will enforce - // additional rules for making sure that the APK is truly updatable. Default is false. + // additional rules to make sure an app can safely be updated. Default is false. + // Prefer using other specific properties if build behaviour must be changed; avoid using this + // flag for anything but neverallow rules (unless the behaviour change is invisible to owners). Updatable *bool } @@ -255,6 +257,9 @@ func (a *AndroidApp) checkAppSdkVersions(ctx android.ModuleContext) { if !a.sdkVersion().stable() { ctx.PropertyErrorf("sdk_version", "Updatable apps must use stable SDKs, found %v", a.sdkVersion()) } + if String(a.deviceProperties.Min_sdk_version) == "" { + ctx.PropertyErrorf("updatable", "updatable apps must set min_sdk_version.") + } } a.checkPlatformAPI(ctx) |