Automation Build Gradle Plugin
The automation-build-gradle plugin provides the ability to build Automation Projects for the DaVinci Configurator with Gradle. It provides the possibility to configure the build with a Gradle DSL and test the scripts with the +++Automation Testing Framework+++.
scriptProject Closure
The scriptProject block provides the configuration options for specific configurations of the automation project.
Classes
The `classes` variable defines which classes need to be placed on the runtime classpath of the DaVinci Configurator while script execution.
The syntax of `classes` is a list of `String`s, of all classes as full qualified Class names.
Syntax: `"javaPkg.subPkg.ClassName"`
scriptProject {
// The property classes defines the classes to load in the DaVinci Configurator
classes = ["MyScript"]
}
DaVinci Configurator Dependency Path
The cfgPath defines the path to the DaVinci Configurator installation. The installation is
needed to retrieve the build dependencies and the generated model.
You can change the path to any location containing the correct version of the DaVinci Configurator.
You could also evaluate SystemEnv variables, other project properties or Gradle settings to define the path dependent of the development machine, instead of encoding an absolute path. This will help, when the project is committed to a version control system. But this is project dependent and out of scope of the provided template project.
// Use a System environment variable as path to the DaVinci Configurator
cfgPath = new File(System.getenv('YOUR_ENV_VARIABLE'))
BSWMD Model Configuration
This closure allows to configure the initBswmdModel task. If the closure is used, the task will automatically generate the BSWMD model jar in case that it is missing. The jar will be also added as a compileOnly dependency to the script project.
scriptProject {
cfgPath = cfgFile
bswmd {
bswPath = localBswPath
}
}
In a multi project setup you should choose one project to create the model with the bswmd closure.
Every other project which needs access to the bswmd model should reference this project with the following example.
In the example a second project depends on the project (named "first") which creates the bswmd model.
dependencies {
compileOnly project(path: ":first", configuration: AutomationBuildGradlePlugin.BSWMD_MODEL_CONFIGURATION)
}
Include Dependencies
The includeDependenciesIntoJar enables or disables bundling of gradle runtime dependencies (e.g. referenced jar files)
into the resulting project jar. If includeDependenciesIntoJar is enabled the project jar file will contain all jar
dependencies under the folder jars inside of the jar file.
The default of includeDependenciesIntoJar is true.
scriptProject {
includeDependenciesIntoJar false
}