You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Gradle, AbstractKotlinCompile.incremental parameter considered as a compile task input, and if this value is changed, we cannot reuse previously saved cache entry:
Task ':delegate:sample:app:compileDebugKotlin' is not up-to-date because:
Value of input property 'incrementalCompilationEnabled$kotlin_gradle_plugin_common' has changed for task ':delegate:sample:app:compileDebugKotlin'
The input changes require a full rebuild for incremental task ':delegate:sample:app:compileDebugKotlin'.
This becomes a problem when we use remote caches:
In our CI, we run cache warmup job on a clean repository without any build folders, thus ir-merges.txt does not exist there, and the incremental compilation turned on.
Locally, developers always have the build folders saved to their project, and ir-merges.txt exists in them, so the incremental compilation turned off.
So when we try to reuse remote cache on a local machine, it does not get reused:
Reproducible scenario without remote cache:
Turn on trackSourceFiles option in Anvil extension
Run gradle clean
Run gradle delegate:sample:app:assembleDebug
Do any change in a file in :sample:app module. Example: rename MyActivity to MyActivity2.
Run gradle delegate:delegate:sample:app:assembleDebug --no-build-cache, so we will have build directory updated, but caches store the old value.
Revert the change from Step 4 (we're at the exactly same position as we were in Step 3, only difference is our build folder is not clean.
Run gradle :sample:app:assembleDebug
In logs, you see that the delegate:sample:app:compileDebugKotlin was not taken from cache, but was re-executed.
Introduced in: 2.5.0-beta11.
The text was updated successfully, but these errors were encountered:
In Gradle,
AbstractKotlinCompile.incremental
parameter considered as a compile task input, and if this value is changed, we cannot reuse previously saved cache entry:This becomes a problem when we use remote caches:
build
folders, thusir-merges.txt
does not exist there, and the incremental compilation turned on.build
folders saved to their project, andir-merges.txt
exists in them, so the incremental compilation turned off.So when we try to reuse remote cache on a local machine, it does not get reused:
Reproducible scenario without remote cache:
trackSourceFiles
option in Anvil extensiongradle clean
gradle delegate:sample:app:assembleDebug
:sample:app
module. Example: renameMyActivity
toMyActivity2
.gradle delegate:delegate:sample:app:assembleDebug --no-build-cache
, so we will havebuild
directory updated, but caches store the old value.build
folder is not clean.gradle :sample:app:assembleDebug
delegate:sample:app:compileDebugKotlin
was not taken from cache, but was re-executed.Introduced in:
2.5.0-beta11
.The text was updated successfully, but these errors were encountered: