java: add one-off build logic for frameworks/base

framework.jar needs to compile against R.java and Manifest.java from
framework-res.apk.  Rather than complicating the Blueprints properties
with values that will only be used once, add one-off logic to
collectDeps to extract the rJarSpec out of the framework-res module.

Change-Id: I1195b1b5e07badc583703479382ceba35300b8fd
This commit is contained in:
Colin Cross
2015-04-13 14:02:52 -07:00
parent 276284f577
commit e7a9f3f7ed
2 changed files with 15 additions and 7 deletions

View File

@@ -111,19 +111,23 @@ func (j jarSpec) soongJarArgs() string {
return "-C " + j.dir + " -l " + j.fileList
}
func TransformJavaToClasses(ctx common.AndroidModuleContext, srcFiles []string,
func TransformJavaToClasses(ctx common.AndroidModuleContext, srcFiles []string, srcFileLists []string,
flags javaBuilderFlags, deps []string) jarSpec {
classDir := filepath.Join(common.ModuleOutDir(ctx), "classes")
classFileList := filepath.Join(common.ModuleOutDir(ctx), "classes.list")
javacFlags := flags.javacFlags + common.JoinWithPrefix(srcFileLists, "@")
deps = append(deps, srcFileLists...)
ctx.Build(pctx, blueprint.BuildParams{
Rule: javac,
Outputs: []string{classFileList},
Inputs: srcFiles,
Implicits: deps,
Args: map[string]string{
"javacFlags": flags.javacFlags,
"javacFlags": javacFlags,
"bootClasspath": flags.bootClasspath,
"classpath": flags.classpath,
"outDir": classDir,