diff options
author | Pranav Gupta <pranavgupta@google.com> | 2023-03-20 16:19:53 -0700 |
---|---|---|
committer | Pranav Gupta <pranavgupta@google.com> | 2023-03-21 08:13:25 -0700 |
commit | 51645ff23ee07b93c2508accadecb0f71d980366 (patch) | |
tree | d5d0815f40babd6daff3063aa19517273d638770 /apex | |
parent | 94d107020a41115dde1202b94c5fa80680bff808 (diff) | |
download | soong-51645ff23ee07b93c2508accadecb0f71d980366.tar.gz |
Add skip-sdk-check to extract_apks
Add skip-sdk-check to skip checking the SDK version when extracting an
APK/APEX from an App Set Bundle. This can be used when the platform SDK
version is not defined and the APEXs/APKs use SHA based SDK versions.
This check should not be set to true for non Beta dessert releases
Bug: 274518686
Test: # Add SHA targeting modules to platform
m SOONG_SKIP_APPSET_SDK_CHECK=true #Build Passes
m SOONG_SKIP_APPSET_SDK_CHECK=false #Build Fails
m #No config supplied, build fails
Change-Id: I1919437d3410f09c991e1de39031bd88e1f8246a
Diffstat (limited to 'apex')
-rw-r--r-- | apex/prebuilt.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apex/prebuilt.go b/apex/prebuilt.go index 0997a68eb..cae507e5d 100644 --- a/apex/prebuilt.go +++ b/apex/prebuilt.go @@ -35,11 +35,12 @@ var ( blueprint.RuleParams{ Command: `rm -rf "$out" && ` + `${extract_apks} -o "${out}" -allow-prereleased=${allow-prereleased} ` + - `-sdk-version=${sdk-version} -abis=${abis} -screen-densities=all -extract-single ` + + `-sdk-version=${sdk-version} -skip-sdk-check=${skip-sdk-check} -abis=${abis} ` + + `-screen-densities=all -extract-single ` + `${in}`, CommandDeps: []string{"${extract_apks}"}, }, - "abis", "allow-prereleased", "sdk-version") + "abis", "allow-prereleased", "sdk-version", "skip-sdk-check") ) type prebuilt interface { @@ -845,6 +846,7 @@ func (p *prebuiltApexExtractorModule) GenerateAndroidBuildActions(ctx android.Mo "abis": strings.Join(abis, ","), "allow-prereleased": strconv.FormatBool(proptools.BoolDefault(p.properties.Prerelease, defaultAllowPrerelease)), "sdk-version": ctx.Config().PlatformSdkVersion().String(), + "skip-sdk-check": strconv.FormatBool(ctx.Config().IsEnvTrue("SOONG_SKIP_APPSET_SDK_CHECK")), }, }) } |