summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
authorJingwen Chen <jingwen@google.com>2020-06-26 08:03:27 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2020-06-26 08:03:27 +0000
commitd06f11ee7119277e0c6bea19c6b4cd74faafef62 (patch)
treed8af7be1717017b4d8331dd1c1df423f9d4c620d /java/java.go
parent9ae615fb9923606277cbeab7c91cc851eaaa7e49 (diff)
parent40fd90ae523beb27d52093b9ca5ba9154a336859 (diff)
Merge "Support multiple dists per Android.bp module, and dist output selection."
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go21
1 files changed, 2 insertions, 19 deletions
diff --git a/java/java.go b/java/java.go
index 5b3163087..0a8eb992c 100644
--- a/java/java.go
+++ b/java/java.go
@@ -479,7 +479,7 @@ type Module struct {
// list of the xref extraction files
kytheFiles android.Paths
- distFile android.Path
+ distFiles android.TaggedDistFiles
// Collect the module directory for IDE info in java/jdeps.go.
modulePaths []string
@@ -1921,18 +1921,9 @@ func (j *Module) IsInstallable() bool {
// Java libraries (.jar file)
//
-type LibraryProperties struct {
- Dist struct {
- // The tag of the output of this module that should be output.
- Tag *string `android:"arch_variant"`
- } `android:"arch_variant"`
-}
-
type Library struct {
Module
- libraryProperties LibraryProperties
-
InstallMixin func(ctx android.ModuleContext, installPath android.Path) (extraInstallDeps android.Paths)
}
@@ -1994,14 +1985,7 @@ func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) {
j.Stem()+".jar", j.outputFile, extraInstallDeps...)
}
- // Verify Dist.Tag is set to a supported output
- if j.libraryProperties.Dist.Tag != nil {
- distFiles, err := j.OutputFiles(*j.libraryProperties.Dist.Tag)
- if err != nil {
- ctx.PropertyErrorf("dist.tag", "%s", err.Error())
- }
- j.distFile = distFiles[0]
- }
+ j.distFiles = j.GenerateTaggedDistFiles(ctx)
}
func (j *Library) DepsMutator(ctx android.BottomUpMutatorContext) {
@@ -2119,7 +2103,6 @@ func LibraryFactory() android.Module {
module := &Library{}
module.addHostAndDeviceProperties()
- module.AddProperties(&module.libraryProperties)
module.initModuleAndImport(&module.ModuleBase)