summaryrefslogtreecommitdiff
path: root/java/ravenwood.go
diff options
context:
space:
mode:
author Yu Liu <yudiliu@google.com> 2025-01-21 10:12:06 -0800
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2025-01-21 10:12:06 -0800
commit61445a99174d0ac61d1f5c44e1697f19eb091b35 (patch)
tree863fc402cae304fb9e8810924c051f77b9bde6dd /java/ravenwood.go
parent8959abcce4c015967e2d8414c29492e264565ce2 (diff)
parent7eebf8b34c4a40fe1f374b7db290ac62ca872c10 (diff)
Merge "Convert JavaFuzzTest, JavaLibrary, generateAndroidBuildActionsWithConfig, ravenwood and robolectricTest to use ModuleProxy." into main
Diffstat (limited to 'java/ravenwood.go')
-rw-r--r--java/ravenwood.go38
1 files changed, 18 insertions, 20 deletions
diff --git a/java/ravenwood.go b/java/ravenwood.go
index 84d6a9f41..8c8d8e99a 100644
--- a/java/ravenwood.go
+++ b/java/ravenwood.go
@@ -185,26 +185,24 @@ func (r *ravenwoodTest) GenerateAndroidBuildActions(ctx android.ModuleContext) {
// All JNI libraries included in the runtime
var runtimeJniModuleNames map[string]bool
- if utils := ctx.GetDirectDepsWithTag(ravenwoodUtilsTag)[0]; utils != nil {
- for _, installFile := range android.OtherModuleProviderOrDefault(
- ctx, utils, android.InstallFilesProvider).InstallFiles {
- installDeps = append(installDeps, installFile)
- }
- jniDeps, ok := android.OtherModuleProvider(ctx, utils, ravenwoodLibgroupJniDepProvider)
- if ok {
- runtimeJniModuleNames = jniDeps.names
- }
+ utils := ctx.GetDirectDepsProxyWithTag(ravenwoodUtilsTag)[0]
+ for _, installFile := range android.OtherModuleProviderOrDefault(
+ ctx, utils, android.InstallFilesProvider).InstallFiles {
+ installDeps = append(installDeps, installFile)
+ }
+ jniDeps, ok := android.OtherModuleProvider(ctx, utils, ravenwoodLibgroupJniDepProvider)
+ if ok {
+ runtimeJniModuleNames = jniDeps.names
}
- if runtime := ctx.GetDirectDepsWithTag(ravenwoodRuntimeTag)[0]; runtime != nil {
- for _, installFile := range android.OtherModuleProviderOrDefault(
- ctx, runtime, android.InstallFilesProvider).InstallFiles {
- installDeps = append(installDeps, installFile)
- }
- jniDeps, ok := android.OtherModuleProvider(ctx, runtime, ravenwoodLibgroupJniDepProvider)
- if ok {
- runtimeJniModuleNames = jniDeps.names
- }
+ runtime := ctx.GetDirectDepsProxyWithTag(ravenwoodRuntimeTag)[0]
+ for _, installFile := range android.OtherModuleProviderOrDefault(
+ ctx, runtime, android.InstallFilesProvider).InstallFiles {
+ installDeps = append(installDeps, installFile)
+ }
+ jniDeps, ok = android.OtherModuleProvider(ctx, runtime, ravenwoodLibgroupJniDepProvider)
+ if ok {
+ runtimeJniModuleNames = jniDeps.names
}
// Also remember what JNI libs are in the runtime.
@@ -228,7 +226,7 @@ func (r *ravenwoodTest) GenerateAndroidBuildActions(ctx android.ModuleContext) {
resApkInstallPath := installPath.Join(ctx, "ravenwood-res-apks")
copyResApk := func(tag blueprint.DependencyTag, toFileName string) {
- if resApk := ctx.GetDirectDepsWithTag(tag); len(resApk) > 0 {
+ if resApk := ctx.GetDirectDepsProxyWithTag(tag); len(resApk) > 0 {
installFile := android.OutputFileForModule(ctx, resApk[0], "")
installResApk := ctx.InstallFile(resApkInstallPath, toFileName, installFile)
installDeps = append(installDeps, installResApk)
@@ -345,7 +343,7 @@ func (r *ravenwoodLibgroup) GenerateAndroidBuildActions(ctx android.ModuleContex
// Install our runtime into expected location for packaging
installPath := android.PathForModuleInstall(ctx, r.BaseModuleName())
for _, lib := range r.ravenwoodLibgroupProperties.Libs {
- libModule := ctx.GetDirectDepWithTag(lib, ravenwoodLibContentTag)
+ libModule := ctx.GetDirectDepProxyWithTag(lib, ravenwoodLibContentTag)
if libModule == nil {
if ctx.Config().AllowMissingDependencies() {
ctx.AddMissingDependencies([]string{lib})