From 16c0a31b188f0e36dc0687504bce740a69ec11c9 Mon Sep 17 00:00:00 2001 From: Nan Zhang Date: Wed, 13 Jun 2018 17:42:48 -0700 Subject: Changed droiddoc.go to compile Metalava based android.jar Test: m -j metalava_android_stubs_current Bug: b/78245848 Change-Id: Ibce139a93a40e412d8def1b26660446b0a7a24ff --- java/java.go | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'java/java.go') diff --git a/java/java.go b/java/java.go index 1fefcabeb..00ee5319b 100644 --- a/java/java.go +++ b/java/java.go @@ -507,7 +507,10 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) { } if ctx.ModuleName() == "android_stubs_current" || ctx.ModuleName() == "android_system_stubs_current" || - ctx.ModuleName() == "android_test_stubs_current" { + ctx.ModuleName() == "android_test_stubs_current" || + ctx.ModuleName() == "metalava_android_stubs_current" || + ctx.ModuleName() == "metalava_android_system_stubs_current" || + ctx.ModuleName() == "metalava_android_test_stubs_current" { ctx.AddDependency(ctx.Module(), frameworkApkTag, "framework-res") } } @@ -628,13 +631,13 @@ func getLinkType(m *Module, name string) linkType { ver := String(m.deviceProperties.Sdk_version) noStdLibs := Bool(m.properties.No_standard_libs) switch { - case name == "core.current.stubs" || ver == "core_current" || noStdLibs: + case name == "core.current.stubs" || ver == "core_current" || noStdLibs || name == "stub-annotations": return javaCore - case name == "android_system_stubs_current" || strings.HasPrefix(ver, "system_"): + case name == "android_system_stubs_current" || strings.HasPrefix(ver, "system_") || name == "metalava_android_system_stubs_current": return javaSystem - case name == "android_test_stubs_current" || strings.HasPrefix(ver, "test_"): + case name == "android_test_stubs_current" || strings.HasPrefix(ver, "test_") || name == "metalava_android_test_stubs_current": return javaPlatform - case name == "android_stubs_current" || ver == "current": + case name == "android_stubs_current" || ver == "current" || name == "metalava_android_stubs_current": return javaSdk case ver == "": return javaPlatform @@ -724,7 +727,10 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps { case frameworkApkTag: if ctx.ModuleName() == "android_stubs_current" || ctx.ModuleName() == "android_system_stubs_current" || - ctx.ModuleName() == "android_test_stubs_current" { + ctx.ModuleName() == "android_test_stubs_current" || + ctx.ModuleName() == "metalava_android_stubs_current" || + ctx.ModuleName() == "metalava_android_system_stubs_current" || + ctx.ModuleName() == "metalava_android_test_stubs_current" { // framework stubs.jar need to depend on framework-res.apk, in order to pull the // resource files out of there for aapt. // -- cgit v1.2.3-59-g8ed1b