hi, for a while i started to see this error in one...
# community-support
g
hi, for a while i started to see this error in one of our projects during incremental compilation of the tests:
Copy code
2025-07-24T19:17:24.388-0700 [INFO] [org.gradle.api.internal.tasks.compile.incremental.SelectiveCompiler] Full recompilation is required because JdkClassWriter.class could not be analyzed for incremental compilation. See the debug log for more details. Analysis took 1.717 secs.
the problem is that this is our biggest project, and the full compilation can take up to more than a minute - which slows down iterating on problems A LOT. • enabling the debug log does not seem to give me any more detailed information. •
JdkClassWriter.class
is only present in dependencies that are also present in other projects that do not have this problem..
that class is in
byte-buddy-1.17.5.jar
- which is a dependency of
org.mockito:mockito-core:5.18.0
v
It looks like the info log should include a small reason for the analysis failure (too recent bytecode version, invalid bytecode, ...) so the message becomes actionable. I think it is worth filing an enhancement request for the log message
g
the problem is i am not even sure how to reproduce the issue - it only seems to be causing issues in a single build - which is unfortunately our biggest... pinning byte-buddy to
1.14.8
seems to solve the issue - but it does not feel like an ideal solution... 😕
v
You most probably need to update Gradle to latest version for the incremental compile to work with that newer BB version. If you look inside the JAR, you see that in 1.14.8 the maximum class file version is Java 9. In 1.17.5 you see that there are also a couple of files with class file version Java 24. Those classes are most probably which cannot be analyzed and thus full recompilation is used. As Gradle 8.14 adds support to use Java 24 to run and for toolchains, it should work with that.
But maybe you should open a bug report about this. Assuming that you do use an older Gradle version and are not using Java 24 to run Gradle or as toolchain, I'd say there is no point in analyzing the Java 24 classes from the multi-release JAR for the incremental compilation analysis, so I'd say they should not even be tried to be analyzed instead of failing and thus disabling incremental compilation.
g
ah, we are using
8.11
and we have a
java 17
toolchain. so upgrading to at least
8.14
AND using
java 24
toolchain would be required to fix the problem with the incremental compilation?
v
No, just upgrading Gradle should be fine
The ASM that is included in the old Gradle version just cannot read those newer class files
g
gotcha, thank you, will give it a try!
👌 1