Hi,
today I've noticed that the hibernate-gradle-plugin causes compile tasks to be always out of date even if nothing changed. This is caused by a Gradle shortcoming described in [ https://github.com/gradle/gradle/issues/5510 |https://github . com/gradle/gradle/issues/5510].
Essentially lambdas are not allowed in *doLast* or *doFirst* configurations on Java, which the plugin uses though. To workaround this issue we can simply extract the lambda to a dedicated Action. I have a branch ready that I'll attach shortly. Before my fix I've seen the following:
{code :java } Task ':project:compileJava' is not up-to-date because: Additional action for task ':project:compileJava': was implemented by the Java lambda 'org.hibernate.orm.tooling.gradle.HibernatePlugin$$Lambda$680/0x0000000800665840'. Using Java lambdas is not supported, use an (anonymous) inner class instead. All input files are considered out-of-date for incremental task ':backend:game:compileJava'. Full recompilation is required because no incremental change information is available. This is usually caused by clean builds or changing compiler arguments. {code}
After my changes I see the expected output if nothing changed:
{code :java } Skipping task ':backend:game:compileJava' as it is up-to-date. {code}
In our case this saves us up to 12 seconds on every run where nothing changed in the java source - e.g. if only tests changed.
Let me know what you think. Cheers, Christoph |
|