aboutsummaryrefslogtreecommitdiffstats
path: root/java/app.go
diff options
context:
space:
mode:
authorJaewoong Jung <jungjw@google.com>2019-07-17 10:21:49 -0700
committerJaewoong Jung <jungjw@google.com>2019-07-17 14:32:49 -0700
commit8aae22e34d4f775a7a62a5878c9ea3829554cef0 (patch)
tree13d4f870e95f6c83e0f55603736df96ed6a12b7d /java/app.go
parentf9a0443a9c66ae9cc1d8466be4ddf120eb884ae6 (diff)
downloadbuild_soong-8aae22e34d4f775a7a62a5878c9ea3829554cef0.tar.gz
build_soong-8aae22e34d4f775a7a62a5878c9ea3829554cef0.tar.bz2
build_soong-8aae22e34d4f775a7a62a5878c9ea3829554cef0.zip
Add filename property to android_app_import
Test: app_test.go Bug: 137218697 Change-Id: If2b20a355bb6e9e8dbcd57347c0e2c6fa041a932
Diffstat (limited to 'java/app.go')
-rw-r--r--java/app.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/java/app.go b/java/app.go
index 34426585..ce4eb32e 100644
--- a/java/app.go
+++ b/java/app.go
@@ -736,6 +736,8 @@ type AndroidAppImport struct {
dexpreopter
usesLibrary usesLibrary
+
+ installPath android.OutputPath
}
type AndroidAppImportProperties struct {
@@ -761,6 +763,9 @@ type AndroidAppImportProperties struct {
// binaries would be installed by default (in PRODUCT_PACKAGES) the other binary will be removed
// from PRODUCT_PACKAGES.
Overrides []string
+
+ // Optional name for the installed app. If unspecified, it is derived from the module name.
+ Filename *string
}
// Chooses a source APK path to use based on the module and product specs.
@@ -913,7 +918,8 @@ func (a *AndroidAppImport) GenerateAndroidBuildActions(ctx android.ModuleContext
// TODO: Optionally compress the output apk.
- ctx.InstallFile(installDir, a.BaseModuleName()+".apk", a.outputFile)
+ a.installPath = ctx.InstallFile(installDir,
+ proptools.StringDefault(a.properties.Filename, a.BaseModuleName()+".apk"), a.outputFile)
// TODO: androidmk converter jni libs
}