summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
authorJingwen Chen <jingwen@google.com>2020-06-26 08:25:04 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-06-26 08:25:04 +0000
commitce00ee318fd34eab8f29424d6a4e71b005e882b7 (patch)
treefadd9a94f27c10394ff62139eae0e8058f86bb66 /java/java.go
parentaa6a37d50d375731eb56acdb2e585f795bc74daf (diff)
parent3779799731453390001908dc2b11d494cc823bc9 (diff)
Merge "Support multiple dists per Android.bp module, and dist output selection." am: d06f11ee71 am: 3779799731
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1335521 Change-Id: I2ca43562972b4d50f1e9fd4a801026aa9abb6816
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 fee5b36cc..42e40b9a3 100644
--- a/java/java.go
+++ b/java/java.go
@@ -483,7 +483,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
@@ -1925,18 +1925,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)
}
@@ -1998,14 +1989,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) {
@@ -2123,7 +2107,6 @@ func LibraryFactory() android.Module {
module := &Library{}
module.addHostAndDeviceProperties()
- module.AddProperties(&module.libraryProperties)
module.initModuleAndImport(&module.ModuleBase)