diff options
author | 2025-03-13 05:16:19 -0700 | |
---|---|---|
committer | 2025-03-13 05:49:32 -0700 | |
commit | 89cd0ac55c5f7625b3d701b91ef8d7f869b99629 (patch) | |
tree | 2e14c7049e985b47b0b324702b97ba2ea0e2d56f | |
parent | 94c261bcb01e2ae05121c171592de5b502953793 (diff) |
Make the Extract_apk field configurable
Fixes: 403200239
Test: m nothing --no-skip-soong-tests
Change-Id: Ibbe6a217d19522712f699adbfbcc6f63d730c7db
-rw-r--r-- | java/app_import.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/java/app_import.go b/java/app_import.go index b9e91cd62..c0e8171d5 100644 --- a/java/app_import.go +++ b/java/app_import.go @@ -177,7 +177,7 @@ type AndroidAppImportProperties struct { Prebuilt_info *string `android:"path"` // Path of extracted apk which is extracted from prebuilt apk. Use this extracted to import. - Extract_apk *string + Extract_apk proptools.Configurable[string] // Compress the output APK using gzip. Defaults to false. Compress_apk proptools.Configurable[bool] `android:"arch_variant,replace_instead_of_append"` @@ -307,7 +307,7 @@ func (a *AndroidAppImport) uncompressEmbeddedJniLibs( func (a *AndroidAppImport) extractSubApk( ctx android.ModuleContext, inputPath android.Path, outputPath android.WritablePath) { - extractApkPath := *a.properties.Extract_apk + extractApkPath := a.properties.Extract_apk.GetOrDefault(ctx, "") ctx.Build(pctx, android.BuildParams{ Rule: extractApkRule, Input: inputPath, @@ -405,7 +405,7 @@ func (a *AndroidAppImport) generateAndroidBuildActions(ctx android.ModuleContext // TODO: LOCAL_PACKAGE_SPLITS srcApk := a.prebuilt.SingleSourcePath(ctx) - if a.properties.Extract_apk != nil { + if a.properties.Extract_apk.GetOrDefault(ctx, "") != "" { extract_apk := android.PathForModuleOut(ctx, "extract-apk", ctx.ModuleName()+".apk") a.extractSubApk(ctx, srcApk, extract_apk) srcApk = extract_apk |