-
Notifications
You must be signed in to change notification settings - Fork 147
How to migrate from Fork 1.x to 2.0
#For Gradle projects ##Dependencies & plugins Make sure you update to Fork & Flakiness Reporter 2.0.0 in the build script dependencies.
buildscript {
dependencies {
classpath 'com.shazam.fork:fork-gradle-plugin:2.0.0'
classpath 'com.shazam.fork:fork-reporter-jenkins-gradle-plugin:2.0.0'
}
}
Apply the Fork and/or Flakiness reporter plugins. Note this has changed from fork
to com.shazam.fork
and fork-jenkins-gradle-plugin
to com.shazam.fork.reporter.jenkins
.
apply plugin: 'com.shazam.fork'
apply plugin: 'com.shazam.fork.reporter.jenkins'
##Runtime configuration Note that Fork no longer requires any of the environment variables for dynamic configuration. Everything is configured via the Fork DSL, as per the examples. Customisation can be achieved with standard Gradle scripts.
#For standalone projects
Make sure you check out a version equal or later than 2.0. The majority of the configuration now goes to a JSON file that will contain all parameters. To point to the file, pass --config /path/to/fork-config.json
as an argument to the fork runner. The available parameters are explained in the configuration details and examples.
#Other changes
- The
android.test.classes
environment variable is gone. You can achieve the same effects by setting the test package and test class that will be considered when scanning for tests (see configuration details).