Incremental Build failing after upgrading from Gradle 4.10.3 to 5.2.1


(Martin Thompson) #1

We only have clean builds now working after the upgrade. A bug describing what is occurring can be found here. https://github.com/real-logic/simple-binary-encoding/issues/652


(James Justinic) #2

The issue is that the sbe-benchmarks project uses an annotation processor, which the implementation of now writes intermediate files to a location that clashes with the generated source destination.

In other words, generateCodecs writes to build/generated. The compileGeneratedJava tasks compiles the classes in build/generated. The compileJava task writes intermediate files from the annotation processor in build/generated/sources/annotationProcessor/java/main. On second run, the intermediate files are included in the source of compileGeneratedJava due to being in build/generated as well.

This could be fixed by updating these two lines to something like generatedSrc instead of generated:

generated.java.srcDir 'build/generatedSrc'
'sbe.output.dir': 'build/generatedSrc'

(Martin Thompson) #3

Thanks. That works. Might be good to output a warning on clash.