diff options
| author | 2019-07-16 13:57:13 -0700 | |
|---|---|---|
| committer | 2019-07-18 14:28:17 -0700 | |
| commit | b77043e20702557ced6f3e57c4dbbc392065ed76 (patch) | |
| tree | a4299e7d09cd6e562d4719eeb4bd3a437d9d9fc7 /java/java.go | |
| parent | 33961b54e623048221ef7cc1b26454592104879a (diff) | |
Add a systemModules utility type
Storing system modules in a classpath is clumsy, as there should
only ever be one system modules, and it needs to store both a
directory to pass as the argument and a set of generated files
to use as dependencies. Store them in a separate systemModules
type instead.
Test: m checkbuild
Change-Id: I020556c736bd5091865bcca51dc0fb9e4db6b45b
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/java/java.go b/java/java.go index a49aad775..f3e10bebd 100644 --- a/java/java.go +++ b/java/java.go @@ -632,8 +632,7 @@ type deps struct { aidlIncludeDirs android.Paths srcs android.Paths srcJars android.Paths - systemModules android.Path - systemModulesDeps android.Paths + systemModules *systemModules aidlPreprocess android.OptionalPath kotlinStdlib android.Paths kotlinAnnotations android.Paths @@ -844,8 +843,7 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps { if sm.outputDir == nil || len(sm.outputDeps) == 0 { panic("Missing directory for system module dependency") } - deps.systemModules = sm.outputDir - deps.systemModulesDeps = sm.outputDeps + deps.systemModules = &systemModules{sm.outputDir, sm.outputDeps} } } }) @@ -973,10 +971,7 @@ func (j *Module) collectBuilderFlags(ctx android.ModuleContext, deps deps) javaB } // systemModules - if deps.systemModules != nil { - flags.systemModules = append(flags.systemModules, deps.systemModules) - flags.systemModulesDeps = append(flags.systemModulesDeps, deps.systemModulesDeps...) - } + flags.systemModules = deps.systemModules // aidl flags. flags.aidlFlags, flags.aidlDeps = j.aidlFlags(ctx, deps.aidlPreprocess, deps.aidlIncludeDirs) |