Gradle plugin causes compile task to be always out of date

Description

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.

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:

After my changes I see the expected output if nothing changed:

In our case this saves us up to 12 seconds on every run where nothing changed in the java main source - e.g. if only tests changed.

Let me know what you think.
Cheers,
Christoph

Environment

None

Assignee

Christoph Dreis

Reporter

Christoph Dreis

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure