diff options
| author | 2019-04-06 04:51:18 +0000 | |
|---|---|---|
| committer | 2019-04-06 04:51:18 +0000 | |
| commit | eb18c874f7c9a28f120dec91841af7c16369f75d (patch) | |
| tree | 2875241a6c7375d7acd514e1fa649d47f7010544 | |
| parent | a0dd60879b63e626f0a6511f37478c8ca1d3c5ba (diff) | |
| parent | dd53e8be1891aa3db182bba24c32d48580d666d4 (diff) | |
Merge "Add installable property for prebuilt_apex"
| -rw-r--r-- | apex/apex.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/apex/apex.go b/apex/apex.go index 3327a566e..2332acc33 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -1317,6 +1317,12 @@ type PrebuiltProperties struct { Src *string } } + + Installable *bool +} + +func (p *Prebuilt) installable() bool { + return p.properties.Installable == nil || proptools.Bool(p.properties.Installable) } func (p *Prebuilt) DepsMutator(ctx android.BottomUpMutatorContext) { @@ -1351,7 +1357,9 @@ func (p *Prebuilt) GenerateAndroidBuildActions(ctx android.ModuleContext) { // TODO(jungjw): Check the key validity. p.inputApex = p.Prebuilt().SingleSourcePath(ctx) p.installDir = android.PathForModuleInstall(ctx, "apex") - ctx.InstallFile(p.installDir, ctx.ModuleName()+imageApexSuffix, p.inputApex) + if p.installable() { + ctx.InstallFile(p.installDir, ctx.ModuleName()+imageApexSuffix, p.inputApex) + } } func (p *Prebuilt) Prebuilt() *android.Prebuilt { @@ -1371,6 +1379,7 @@ func (p *Prebuilt) AndroidMk() android.AndroidMkData { func(w io.Writer, outputFile android.Path) { fmt.Fprintln(w, "LOCAL_MODULE_PATH :=", filepath.Join("$(OUT_DIR)", p.installDir.RelPathString())) fmt.Fprintln(w, "LOCAL_MODULE_STEM :=", p.BaseModuleName()+imageApexSuffix) + fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE :=", !p.installable()) }, }, } |