Merge "Add soong cc and java deps to general-tests dist" am: 203a3f2f39 am: 49ab00709d

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1353585

Change-Id: I4aa866011c467979fdefa6a30fa660f125a4d414
This commit is contained in:
Liz Kammer
2020-07-07 15:30:48 +00:00
committed by Automerger Merge Worker
2 changed files with 36 additions and 0 deletions

View File

@@ -34,8 +34,11 @@ func jDepsGeneratorSingleton() android.Singleton {
}
type jdepsGeneratorSingleton struct {
outputPath android.Path
}
var _ android.SingletonMakeVarsProvider = (*jdepsGeneratorSingleton)(nil)
const (
// Environment variables used to modify behavior of this singleton.
envVariableCollectJavaDeps = "SOONG_COLLECT_JAVA_DEPS"
@@ -97,6 +100,21 @@ func (j *jdepsGeneratorSingleton) GenerateBuildActions(ctx android.SingletonCont
if err != nil {
ctx.Errorf(err.Error())
}
j.outputPath = jfpath
// This is necessary to satisfy the dangling rules check as this file is written by Soong rather than a rule.
ctx.Build(pctx, android.BuildParams{
Rule: android.Touch,
Output: jfpath,
})
}
func (j *jdepsGeneratorSingleton) MakeVars(ctx android.MakeVarsContext) {
if j.outputPath == nil {
return
}
ctx.DistForGoal("general-tests", j.outputPath)
}
func createJsonFile(moduleInfos map[string]android.IdeInfo, jfpath android.WritablePath) error {