From dcf71b299ca9c85a31f9b895d8e8529d03cd7e04 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 1 Feb 2021 13:59:03 -0800 Subject: 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 --- java/system_modules.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'java/system_modules.go') diff --git a/java/system_modules.go b/java/system_modules.go index 5cc546d2e..95f71b80f 100644 --- a/java/system_modules.go +++ b/java/system_modules.go @@ -160,8 +160,8 @@ func (system *SystemModules) GenerateAndroidBuildActions(ctx android.ModuleConte var jars android.Paths ctx.VisitDirectDepsWithTag(systemModulesLibsTag, func(module android.Module) { - dep, _ := module.(Dependency) - jars = append(jars, dep.HeaderJars()...) + dep, _ := ctx.OtherModuleProvider(module, JavaInfoProvider).(JavaInfo) + jars = append(jars, dep.HeaderJars...) }) system.headerJars = jars -- cgit v1.2.3-59-g8ed1b