diff options
author | 2024-03-28 14:42:20 -0700 | |
---|---|---|
committer | 2024-08-16 12:08:35 -0700 | |
commit | 7ded3827a4b4dda895d2bb0b2dc3063a59ad32f7 (patch) | |
tree | c53aa75747d2880fa53b82ef68e577426d5eda24 /java/builder.go | |
parent | dd00f2de3cb65c2ad6811ad8edd34bdafdb3af82 (diff) |
Run "ravenizer" on ravenwood jars
Ravenizer is a new tool to preprocess ravenwood tests.
It can optionally be applied to other java targets (for analyzing them,
etc).
The actual tool is being implemented internally, so in AOSP, we just
use a script that copies the jar file as a replacement.
Test: manual -- run `m RavenwoodBivalentTest` and make sure the ravenizer
log message shows up.
Flag: EXEMPT host test change only
Bug: 360390999
Change-Id: I6d1f81e7c425397b16c37e7c30267957097387fd
Diffstat (limited to 'java/builder.go')
-rw-r--r-- | java/builder.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/java/builder.go b/java/builder.go index 5d84d0b43..02928dfd7 100644 --- a/java/builder.go +++ b/java/builder.go @@ -258,6 +258,13 @@ var ( }, ) + ravenizer = pctx.AndroidStaticRule("ravenizer", + blueprint.RuleParams{ + Command: "rm -f $out && ${ravenizer} --in-jar $in --out-jar $out", + CommandDeps: []string{"${ravenizer}"}, + }, + ) + zipalign = pctx.AndroidStaticRule("zipalign", blueprint.RuleParams{ Command: "if ! ${config.ZipAlign} -c -p 4 $in > /dev/null; then " + @@ -307,6 +314,7 @@ func init() { pctx.Import("android/soong/java/config") pctx.HostBinToolVariable("aconfig", "aconfig") + pctx.HostBinToolVariable("ravenizer", "ravenizer") pctx.HostBinToolVariable("keep-flagged-apis", "keep-flagged-apis") } @@ -746,6 +754,16 @@ func TransformJetifier(ctx android.ModuleContext, outputFile android.WritablePat }) } +func TransformRavenizer(ctx android.ModuleContext, outputFile android.WritablePath, + inputFile android.Path) { + ctx.Build(pctx, android.BuildParams{ + Rule: ravenizer, + Description: "ravenizer", + Output: outputFile, + Input: inputFile, + }) +} + func GenerateMainClassManifest(ctx android.ModuleContext, outputFile android.WritablePath, mainClass string) { android.WriteFileRule(ctx, outputFile, "Main-Class: "+mainClass+"\n") } |