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 |
defaultMessageChecks |
failOn |
As an opposite use |
augmentMessageChecksForVersionFromDefault |
forVersion(ver) { failOn } |
Use |
deprecationMessageChecksForVersion |
forVersion(ver) { failOn } |
Use |
messageChecksForVersion |
forVersion(ver) { failOn } |
Use |
replaceDeprecationMessageChecksForVersion |
forVersion(ver) { setFailOn } |
Use |
setDeprecationMessagesAreFailures |
forVersion(ver) { setFailOn } |
Use |
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 |
getConfigurationCacheModeMapping |
getExecutionMap |
|
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%%'
}
}