summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2019-10-19 02:45:42 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2019-10-19 02:45:42 +0000
commit8141c8781a927bea6f04d04eec6c9904e4f83d50 (patch)
treeeedf035ec29372c639920f35050ae7700d7d040e /java/java.go
parent760d3d35b6a9b46d6e0edc25bfb780b7b79c916f (diff)
parentf0f2e2cf79558569c227e8d96a784d9c0679814a (diff)
Merge "Add tradefed_java_library_host"
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/java/java.go b/java/java.go
index 0aef69e46..be48256af 100644
--- a/java/java.go
+++ b/java/java.go
@@ -1577,6 +1577,8 @@ func (j *Module) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Modu
type Library struct {
Module
+
+ InstallMixin func(ctx android.ModuleContext, installPath android.Path) (extraInstallDeps android.Paths)
}
func shouldUncompressDex(ctx android.ModuleContext, dexpreopter *dexpreopter) bool {
@@ -1607,8 +1609,12 @@ func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) {
exclusivelyForApex := android.InAnyApex(ctx.ModuleName()) && !j.IsForPlatform()
if (Bool(j.properties.Installable) || ctx.Host()) && !exclusivelyForApex {
+ var extraInstallDeps android.Paths
+ if j.InstallMixin != nil {
+ extraInstallDeps = j.InstallMixin(ctx, j.outputFile)
+ }
j.installFile = ctx.InstallFile(android.PathForModuleInstall(ctx, "framework"),
- ctx.ModuleName()+".jar", j.outputFile)
+ ctx.ModuleName()+".jar", j.outputFile, extraInstallDeps...)
}
}