Move dists to GenerateAndroidBuildActions

So that we're not as make-focused by disting in MakeVarsProviders.

Bug: 395184523
Test: Verified ninja files were unchanged (on both m nothing and m nothing dist)
Change-Id: I5fd94754d644162b355722fbb1e1fd6f085345b9
diff --git a/java/droidstubs.go b/java/droidstubs.go
index c8f798a..caad688 100644
--- a/java/droidstubs.go
+++ b/java/droidstubs.go
@@ -1429,6 +1429,16 @@
 	d.setOutputFiles(ctx)
 
 	d.setPhonyRules(ctx)
+
+	if d.apiLintTimestamp != nil {
+		if d.apiLintReport != nil {
+			ctx.DistForGoalsWithFilename(
+				[]string{fmt.Sprintf("%s-api-lint", d.Name()), "droidcore"},
+				d.apiLintReport,
+				fmt.Sprintf("apilint/%s-lint-report.txt", d.Name()),
+			)
+		}
+	}
 }
 
 func setDroidInfo(ctx android.ModuleContext, d *Droidstubs, info *StubsInfo, typ StubsType) {
@@ -1524,18 +1534,6 @@
 	}
 )
 
-func (d *Droidstubs) MakeVars(ctx android.MakeVarsModuleContext) {
-	if d.apiLintTimestamp != nil {
-		if d.apiLintReport != nil {
-			ctx.DistForGoalsWithFilename(
-				[]string{fmt.Sprintf("%s-api-lint", d.Name()), "droidcore"},
-				d.apiLintReport,
-				fmt.Sprintf("apilint/%s-lint-report.txt", d.Name()),
-			)
-		}
-	}
-}
-
 func StubsDefaultsFactory() android.Module {
 	module := &DocDefaults{}
 
diff --git a/java/java.go b/java/java.go
index 91b7cf2..383fc3f 100644
--- a/java/java.go
+++ b/java/java.go
@@ -1282,13 +1282,6 @@
 			Input:  j.implementationAndResourcesJar,
 			Output: j.apiXmlFile,
 		})
-	}
-}
-
-var _ android.ModuleMakeVarsProvider = (*Library)(nil)
-
-func (j *Library) MakeVars(ctx android.MakeVarsModuleContext) {
-	if j.apiXmlFile != nil {
 		ctx.DistForGoal("dist_files", j.apiXmlFile)
 	}
 }
diff --git a/java/jdeps.go b/java/jdeps.go
index c2ce503..927c169 100644
--- a/java/jdeps.go
+++ b/java/jdeps.go
@@ -37,8 +37,6 @@
 	outputPath android.Path
 }
 
-var _ android.SingletonMakeVarsProvider = (*jdepsGeneratorSingleton)(nil)
-
 const (
 	jdepsJsonFileName = "module_bp_java_deps.json"
 )
@@ -101,13 +99,6 @@
 		Rule:   android.Touch,
 		Output: jfpath,
 	})
-}
-
-func (j *jdepsGeneratorSingleton) MakeVars(ctx android.MakeVarsContext) {
-	if j.outputPath == nil {
-		return
-	}
-
 	ctx.DistForGoal("general-tests", j.outputPath)
 }
 
diff --git a/java/lint.go b/java/lint.go
index 3838745..66f7f85 100644
--- a/java/lint.go
+++ b/java/lint.go
@@ -704,16 +704,12 @@
 	zip(l.referenceBaselineZip, func(l *LintInfo) android.Path { return l.ReferenceBaseline })
 
 	ctx.Phony("lint-check", l.htmlZip, l.textZip, l.xmlZip, l.referenceBaselineZip)
-}
 
-func (l *lintSingleton) MakeVars(ctx android.MakeVarsContext) {
 	if !ctx.Config().UnbundledBuild() {
 		ctx.DistForGoal("lint-check", l.htmlZip, l.textZip, l.xmlZip, l.referenceBaselineZip)
 	}
 }
 
-var _ android.SingletonMakeVarsProvider = (*lintSingleton)(nil)
-
 func init() {
 	android.RegisterParallelSingletonType("lint",
 		func() android.Singleton { return &lintSingleton{} })
diff --git a/java/platform_compat_config.go b/java/platform_compat_config.go
index bb98944..d4d2fb5 100644
--- a/java/platform_compat_config.go
+++ b/java/platform_compat_config.go
@@ -278,12 +278,7 @@
 	rule.Build("merged-compat-config", "Merge compat config")
 
 	p.metadata = outputPath
-}
-
-func (p *platformCompatConfigSingleton) MakeVars(ctx android.MakeVarsContext) {
-	if p.metadata != nil {
-		ctx.DistForGoal("droidcore", p.metadata)
-	}
+	ctx.DistForGoal("droidcore", p.metadata)
 }
 
 func platformCompatConfigSingletonFactory() android.Singleton {