Upgrading From Older Releases

For any release prior to v3, upgrade to 3.0.1 first. For any release prior to v4. upgrade to 4.2.1 first.

From 4.x to 5.0

The main difference is that a number of DSL items inside the test source sets have been moved inside configuration blocks. This includes:

  • Deprecation messages

  • Configuration cache

Deprecation Messages

4.x

5.x

Notes

setDeprecationMessagesAreFailuresForAllVersions

deprecationsMessages,setDeprecationMessagesAreFailures

-

getDeprecationMessagesAreFailures

deprecationMessages.failIfFound

-

setDefaultDeprecationMessageChecks

setFailOn

As an opposite use setIgnoreIf

defaultMessageChecks

failOn

As an opposite use ignoreIf

augmentMessageChecksForVersionFromDefault

forVersion(ver) { failOn }

Use forVersion and then add specific patterns.

deprecationMessageChecksForVersion

forVersion(ver) { failOn }

Use forVersion and then add specific patterns.

messageChecksForVersion

forVersion(ver) { failOn }

Use forVersion and then add specific patterns.

replaceDeprecationMessageChecksForVersion

forVersion(ver) { setFailOn }

Use forVersion and then set specific patterns.

setDeprecationMessagesAreFailures

forVersion(ver) { setFailOn }

Use forVersion and then set specific patterns.

Configuration cache

4.x

5.x

Notes

configurationCacheMapping

configurationCache.setMode / forVersion (ver) { configurationCache.setMode }

Can be globally set for the test set or overridden on a per-version basis using forVersion.

getConfigurationCacheModeMapping

getExecutionMap

getExecutionMap has support for configuration mode on a per version basis.

v3.x

Copy all GradleTest-related configuration from gradleTest task into gradleTestSets.testSets.main { } DSL block. See TestSets for details.

v2.x

Sources are now generated into the ./.generated-src/gradleTestPlugin directory instead of build/gradleTest/src. This is so that IntelliJ can correctly identify the test source code.

v1.x

Any version of Gradle 2.x listed in gradleTest.versions will be ignored during testing. A warning message will be printed in this case.

v0.5.x

%%.VERSION%% is no longer supported when building with Gradle 2.13+ and builds will fail with Could not find foo:bar:%%VERSION%%` error if encountered. Simply remove the classpath, and if you don’t anything extra in the buildscript block, the whole of the buildscript block.

For instance the following block can be completely removed:

buildscript {
    dependencies {
        classpath 'com.github.jruby-gradle:jruby-gradle-plugin:%%VERSION%%'
    }
}