Hello! I'm facing a strange caching scenario: I h...
# caching
g
Hello! I'm facing a strange caching scenario: I have an Android module which 74 other modules depends on it. When I make an ABI change (add a parameter to a public function to an interface) in this module, it recompiles 71 modules. But, only one module really depends on this interface I just changed, so I expected that compile avoidance played its part. Am I missing something? More details on the ๐Ÿงต
I have compile avoidance enabled for kapt on `gradle.properties`:
Copy code
kapt.include.compile.classpath=false
And it basically runs these tasks for all 71 modules:
Copy code
kaptDebugKotlin
kspDebugKotlin
kaptGenerateStubsDebugKotlin
compileDebugKotlin
On Develocity, I can see this motive why the
kapt
task ran on a module that doesn't depend on the changed interface:
Copy code
The task was not up-to-date because of the following reasons:	
Input property 'classpathStructure' file ~/.gradle/caches/8.8/transforms/5d65280403de76022a438bf3f0c32b43/transformed/output.bin has been added.	
Input property 'classpathStructure' file ~/.gradle/caches/8.8/transforms/4a839ecd78983dc2101fd6cfe044ca1b/transformed/output.bin has been removed.	
Input property 'internalAbiClasspath$kotlin_gradle_plugin_common' file changed_module/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar has changed.
This interface I changed has it's binding mapped on Dagger
Am I missing something? Should all these module recompile or maybe there's something wrong?
t
do the 71 directly depend on it or is it making it to them on the api configuration of others in the chain? if so this sounds like expected behavior and incremental compilation should be kicking in making it at least faster
g
71 directly depend on with, with
implementation
looking at the tasks duration, incremental compilation is indeed working, but isn't this a scenario for compile avoidance?
Oh, I have the wrong concept... Only non-abi change (abi compatible) runs compile avoidance. Changes to ABI recompile what's necessary with incremental compilation
โ˜๐Ÿป 1
t
exactly