diff options
author | 2023-09-15 15:16:12 -0700 | |
---|---|---|
committer | 2023-09-20 09:53:39 -0700 | |
commit | ed27322aa5add7090773beb5ca499d869c89aba8 (patch) | |
tree | d87707ed8a7d5cab459bab688c3f653eb9ef9252 /java/kotlin.go | |
parent | 3ef9285ed21d9a7a4a078acc6f6c566da30ba99c (diff) |
Enable restat for kapt stubs rules
The output of the kapt stubs rules only change when the public interface
of a kotlin class changes, which makes them a good candidate for restat.
This will prevent some unnecessary reruns of turbine annotation
processing.
Bug: 297356926
Test: builds
Change-Id: I39bd63284fd37058f69a0a3dace1ea5f4f50e8b5
Diffstat (limited to 'java/kotlin.go')
-rw-r--r-- | java/kotlin.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/java/kotlin.go b/java/kotlin.go index 3637e2e71..aa2db0ecd 100644 --- a/java/kotlin.go +++ b/java/kotlin.go @@ -145,7 +145,7 @@ var kaptStubs = pctx.AndroidRemoteStaticRule("kaptStubs", android.RemoteRuleSupp `$kaptProcessorPath ` + `$kaptProcessor ` + `-Xbuild-file=$kotlinBuildFile && ` + - `${config.SoongZipCmd} -jar -o $out -C $kaptDir/stubs -D $kaptDir/stubs && ` + + `${config.SoongZipCmd} -jar -write_if_changed -o $out -C $kaptDir/stubs -D $kaptDir/stubs && ` + `rm -rf "$srcJarDir"`, CommandDeps: []string{ "${config.KotlincCmd}", @@ -157,6 +157,7 @@ var kaptStubs = pctx.AndroidRemoteStaticRule("kaptStubs", android.RemoteRuleSupp }, Rspfile: "$out.rsp", RspfileContent: `$in`, + Restat: true, }, "kotlincFlags", "encodedJavacFlags", "kaptProcessorPath", "kaptProcessor", "classpath", "srcJars", "commonSrcFilesArg", "srcJarDir", "kaptDir", "kotlinJvmTarget", |