Convert AndroidLibrary.GenerateAndroidBuildActions,
ApiLibrry.GenerateAndroidBuildActions, Binary.GenerateAndroidBuildActions and collectDepProguardSpecInfo to use ModuleProxy.

Bug: 377723687
Test: Unit tests and compare the ninja and mk files generated.
Change-Id: I2d9a09ee6797d9cb2a7d696571784fcfcea7aff7
diff --git a/java/droidstubs.go b/java/droidstubs.go
index fa1fb86..17c39fc 100644
--- a/java/droidstubs.go
+++ b/java/droidstubs.go
@@ -20,6 +20,7 @@
 	"regexp"
 	"strings"
 
+	"github.com/google/blueprint"
 	"github.com/google/blueprint/proptools"
 
 	"android/soong/android"
@@ -27,6 +28,12 @@
 	"android/soong/remoteexec"
 )
 
+type DroidStubsInfo struct {
+	CurrentApiTimestamp android.Path
+}
+
+var DroidStubsInfoProvider = blueprint.NewProvider[DroidStubsInfo]()
+
 // The values allowed for Droidstubs' Api_levels_sdk_type
 var allowedApiLevelSdkTypes = []string{"public", "system", "module-lib", "system-server"}
 
@@ -1340,6 +1347,10 @@
 		rule.Build("nullabilityWarningsCheck", "nullability warnings check")
 	}
 
+	android.SetProvider(ctx, DroidStubsInfoProvider, DroidStubsInfo{
+		CurrentApiTimestamp: d.CurrentApiTimestamp(),
+	})
+
 	d.setOutputFiles(ctx)
 }