diff options
author | Liz Kammer <eakammer@google.com> | 2020-06-30 14:37:22 -0700 |
---|---|---|
committer | Liz Kammer <eakammer@google.com> | 2020-07-07 22:41:31 +0000 |
commit | 63d687989dee282f79f8922c5365890a05cdad6e (patch) | |
tree | adbf1d9ee672a113496848e77be20992ad5a81d4 /java | |
parent | 1b7fc95d68e1a82a0119686fd3a6e311f84960a1 (diff) | |
download | build_soong-63d687989dee282f79f8922c5365890a05cdad6e.tar.gz build_soong-63d687989dee282f79f8922c5365890a05cdad6e.tar.bz2 build_soong-63d687989dee282f79f8922c5365890a05cdad6e.zip |
Add soong cc and java deps to general-tests dist
Test: m SOONG_COLLECT_CC_DEPS=true SOONG_COLLECT_JAVA_DEPS=true dist
general-tests and verify module_bp_java_deps.json and
module_bp_cc_deps.json is in out/dist
Test: m SOONG_COLLECT_CC_DEPS=true SOONG_COLLECT_JAVA_DEPS=true
checkbuild dist general-tests
Bug: 154845369
Merged-In: I683fe1d7e17f7abaab40206770d09db705493ffb
Change-Id: I683fe1d7e17f7abaab40206770d09db705493ffb
Diffstat (limited to 'java')
-rw-r--r-- | java/jdeps.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/java/jdeps.go b/java/jdeps.go index 49e3de3c..4f636a59 100644 --- a/java/jdeps.go +++ b/java/jdeps.go @@ -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" @@ -96,6 +99,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 { |