summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2024-08-08 14:04:42 -0700
committer Colin Cross <ccross@android.com> 2024-08-09 16:47:45 -0700
commitb61c2269435276862c927f40915e9888ae7908f4 (patch)
tree9d9119fdf2a4d022cf810b070e0f5c76392b9e17 /java/java.go
parenta66b4630f60847c216699831b99aeb905362ccda (diff)
Use a provider for systems modules
Replace the SystemModulesProvider interface with Provider Test: all soong tests Flag: EXEMPT refactor Change-Id: If313580b28094d55b71f1635259bafa850ef7af5
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/java/java.go b/java/java.go
index be3f90b20..126d8f3a4 100644
--- a/java/java.go
+++ b/java/java.go
@@ -2261,8 +2261,9 @@ func (al *ApiLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
staticLibs = append(staticLibs, provider.HeaderJars...)
}
case systemModulesTag:
- module := dep.(SystemModulesProvider)
- systemModulesPaths = append(systemModulesPaths, module.HeaderJars()...)
+ if sm, ok := android.OtherModuleProvider(ctx, dep, SystemModulesProvider); ok {
+ systemModulesPaths = append(systemModulesPaths, sm.HeaderJars...)
+ }
case metalavaCurrentApiTimestampTag:
if currentApiTimestampProvider, ok := dep.(currentApiTimestampProvider); ok {
al.validationPaths = append(al.validationPaths, currentApiTimestampProvider.CurrentApiTimestamp())