Merge "Adapt special case framework support."

This commit is contained in:
Mathew Inwood 2018-09-05 16:13:32 +00:00 committed by Gerrit Code Review
commit 32a96ad6f5
2 changed files with 3 additions and 3 deletions

View File

@ -70,7 +70,7 @@ func (library *Library) AndroidMk() android.AndroidMkData {
// Temporary hack: export sources used to compile framework.jar to Make
// to be used for droiddoc
// TODO(ccross): remove this once droiddoc is in soong
if library.Name() == "framework" {
if (library.Name() == "framework") || (library.Name() == "framework-annotation-proc") {
fmt.Fprintln(w, "SOONG_FRAMEWORK_SRCS :=", strings.Join(library.compiledJavaSrcs.Strings(), " "))
fmt.Fprintln(w, "SOONG_FRAMEWORK_SRCJARS :=", strings.Join(library.compiledSrcJars.Strings(), " "))
}

View File

@ -575,7 +575,7 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) {
} else if *j.deviceProperties.System_modules != "none" && ctx.Config().TargetOpenJDK9() {
ctx.AddVariationDependencies(nil, systemModulesTag, *j.deviceProperties.System_modules)
}
if ctx.ModuleName() == "framework" {
if (ctx.ModuleName() == "framework") || (ctx.ModuleName() == "framework-annotation-proc") {
ctx.AddVariationDependencies(nil, frameworkResTag, "framework-res")
}
if ctx.ModuleName() == "android_stubs_current" ||
@ -804,7 +804,7 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps {
case annoTag:
deps.processorPath = append(deps.processorPath, dep.ImplementationAndResourcesJars()...)
case frameworkResTag:
if ctx.ModuleName() == "framework" {
if (ctx.ModuleName() == "framework") || (ctx.ModuleName() == "framework-annotation-proc") {
// framework.jar has a one-off dependency on the R.java and Manifest.java files
// generated by framework-res.apk
deps.srcJars = append(deps.srcJars, dep.(*AndroidApp).aaptSrcJar)