Added Gradle 4.5.1 to compatibility set
First fix this code in GradleTest.groovy
as it is applying the argument to all Gradle versions if the current version is 4.5+. It needs to be selectively applied instead.
if (GradleVersions.GRADLE_4_5_OR_LATER) {
arguments += '--warning-mode=all'
}
A potential solution is the usage of a map which can be configured to only apply specific options for specific versions.