Convert java.Dependency to JavaInfo provider
Export information about java dependencies through a Provider instead of accessing the module directly. Test: java_test.go Test: no changes to build.ninja Change-Id: Ifc5d566bf6f6ebc0ad399e948effaa1ef6a22876
This commit is contained in:
@@ -28,7 +28,6 @@ import (
|
||||
)
|
||||
|
||||
type AndroidLibraryDependency interface {
|
||||
Dependency
|
||||
ExportPackage() android.Path
|
||||
ExportedProguardFlagFiles() android.Paths
|
||||
ExportedRRODirs() []rroDir
|
||||
@@ -796,9 +795,13 @@ func (a *AARImport) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
|
||||
aapt2Link(ctx, a.exportPackage, srcJar, proguardOptionsFile, rTxt, a.extraAaptPackagesFile,
|
||||
linkFlags, linkDeps, nil, overlayRes, transitiveAssets, nil)
|
||||
}
|
||||
|
||||
var _ Dependency = (*AARImport)(nil)
|
||||
ctx.SetProvider(JavaInfoProvider, JavaInfo{
|
||||
HeaderJars: android.PathsIfNonNil(a.classpathFile),
|
||||
ImplementationAndResourcesJars: android.PathsIfNonNil(a.classpathFile),
|
||||
ImplementationJars: android.PathsIfNonNil(a.classpathFile),
|
||||
})
|
||||
}
|
||||
|
||||
func (a *AARImport) HeaderJars() android.Paths {
|
||||
return android.Paths{a.classpathFile}
|
||||
|
Reference in New Issue
Block a user