Change classpath for droiddoc
When the module type is SdkLibraryDependency, the classpath has been gotten from headerJar Becuase droiddoc uses src files when it builds, we should change to use ImplementationJars instead of headerJar. Bug: 77577799 Test: make -j Change-Id: I1a072be69d7edff5636ea80af700be7796c3b0fc
This commit is contained in:
@@ -129,6 +129,11 @@ type sdkLibrary struct {
|
||||
systemApiStubsPath android.Paths
|
||||
testApiStubsPath android.Paths
|
||||
implLibPath android.Paths
|
||||
|
||||
publicApiStubsImplPath android.Paths
|
||||
systemApiStubsImplPath android.Paths
|
||||
testApiStubsImplPath android.Paths
|
||||
implLibImplPath android.Paths
|
||||
}
|
||||
|
||||
func (module *sdkLibrary) DepsMutator(ctx android.BottomUpMutatorContext) {
|
||||
@@ -151,12 +156,16 @@ func (module *sdkLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext)
|
||||
switch tag {
|
||||
case publicApiStubsTag:
|
||||
module.publicApiStubsPath = lib.HeaderJars()
|
||||
module.publicApiStubsImplPath = lib.ImplementationJars()
|
||||
case systemApiStubsTag:
|
||||
module.systemApiStubsPath = lib.HeaderJars()
|
||||
module.systemApiStubsImplPath = lib.ImplementationJars()
|
||||
case testApiStubsTag:
|
||||
module.testApiStubsPath = lib.HeaderJars()
|
||||
module.testApiStubsImplPath = lib.ImplementationJars()
|
||||
case implLibTag:
|
||||
module.implLibPath = lib.HeaderJars()
|
||||
module.implLibImplPath = lib.ImplementationJars()
|
||||
default:
|
||||
ctx.ModuleErrorf("depends on module %q of unknown tag %q", otherName, tag)
|
||||
}
|
||||
@@ -557,6 +566,18 @@ func (module *sdkLibrary) HeaderJars(linkType linkType) android.Paths {
|
||||
}
|
||||
}
|
||||
|
||||
// to satisfy SdkLibraryDependency interface
|
||||
func (module *sdkLibrary) ImplementationJars(linkType linkType) android.Paths {
|
||||
// This module is just a wrapper for the stubs.
|
||||
if linkType == javaSystem {
|
||||
return module.systemApiStubsImplPath
|
||||
} else if linkType == javaPlatform {
|
||||
return module.implLibImplPath
|
||||
} else {
|
||||
return module.publicApiStubsImplPath
|
||||
}
|
||||
}
|
||||
|
||||
func javaSdkLibraries(config android.Config) *[]string {
|
||||
return config.Once("javaSdkLibraries", func() interface{} {
|
||||
return &[]string{}
|
||||
|
Reference in New Issue
Block a user