Gradle Plugin
The Paramixel Gradle plugin provides the paramixelTest task for discovering and executing Paramixel action trees.
Applying the plugin
In your build.gradle.kts:
plugins {
id("org.paramixel") version "3.0.0"
}
The plugin applies the java plugin, creates the paramixel DSL extension, and registers the paramixelTest task. The task is wired into the check lifecycle — running ./gradlew check also runs Paramixel tests.
DSL extension
Configure defaults via the paramixel extension:
paramixel {
failIfNoTests.set(true)
failureOnSkip.set(false)
parallelism.set(4)
matchTag.set("smoke")
reportFile.set(layout.buildDirectory.file("paramixel/paramixel.json").map { it.asFile.absolutePath })
}
Extension properties
| Property | Type | Default | Description |
|---|---|---|---|
skipTests | Property<Boolean> | false | Skip Paramixel test execution entirely |
failIfNoTests | Property<Boolean> | false | Fail the build when no action factories are discovered |
failureOnSkip | Property<Boolean> | false | Treat skipped results as failures |
parallelism | Property<Integer> | unset | Runner parallelism level; framework default used when absent |
matchPackage | Property<String> | unset | Regex filter for package names |
matchClass | Property<String> | unset | Regex filter for fully-qualified class names |
matchTag | Property<String> | unset | Regex filter for tags |
reportFile | Property<String> | unset | File path for summary report; no report written when absent |
Unset optional properties do not overlay framework defaults — they are simply omitted from the configuration map.
Task properties
The paramixelTest task inherits defaults from the extension and allows per-task overrides:
tasks.named<ParamixelTestTask>("paramixelTest") {
parallelism.set(8)
reportFile.set(layout.buildDirectory.file("paramixel/custom-report.html").map { it.asFile.absolutePath })
}
All extension properties are available as task inputs. Task-level values override extension defaults.
CLI flags
./gradlew paramixelTest
./gradlew paramixelTest -Pparamixel.skipTests=true
./gradlew paramixelTest -Pparamixel.failIfNoTests=false
./gradlew paramixelTest -Pparamixel.failureOnSkip=true
./gradlew paramixelTest -Pparamixel.parallelism=8
./gradlew paramixelTest -Pparamixel.match.tag=smoke
./gradlew paramixelTest -Pparamixel.report.file=build/paramixel/paramixel.json
Report files
When reportFile is set:
- the plugin creates parent directories on demand
- console output still appears normally
- the configured file is overwritten on each run
- the file contains the summary tree without ANSI color codes
- supported formats:
text,json,xml,html - format is inferred from the
reportFileextension - tilde (
~) expansion is supported on Linux and macOS
Example output paths:
build/paramixel/paramixel.json
~/reports/paramixel.html
Configuration precedence
The plugin builds configuration in this order:
- classpath
paramixel.propertiesplus built-in defaults - DSL extension / task properties (only when
Property.isPresent()is true) - explicit Gradle provider properties (
-Dparamixel.*over-Pparamixel.*)
Discovery behavior
The task builds a test classpath from testSourceSet.runtimeClasspath and calls:
Resolver.resolveActions(configuration, selector)
Discovered factories are always combined as a Parallel root.
Differences from the Maven plugin
| Feature | Gradle | Maven |
|---|---|---|
parallelism DSL | First-class property | <properties> list |
matchPackage / matchClass / matchTag | First-class properties | <properties> list or system properties |
| Arbitrary configuration keys | Not supported (use DSL properties) | Supported via <properties> list |
| Task goal | paramixelTest | test |