9.0.0
Features
- Arguments of all task types are configurable on the command line (#239).
- New tasks
runNode
,runCorepack
,runNpm
,runPnpm
,runYarn
allow to execute an instant command from a Gradle command line without registering a custom task (#242). - Support of Node.js distribution compatible with Windows ARM architecture (Node.js ≥ 19.9.0) (#249).
Upgrading from 8.0.0+
Breaking changes
New tasks run[Node|Corepack|Npm|Pnpm|Yarn]
have a name that is conflicting with the name of implementation classes for task types Run[Node|Corepack|Npm|Pnpm|Yarn]
. The script
input property of these task types also suffer from a confusing name as it contains arguments to be appended after the name of the executable rather than a script identifier from the scripts
section of the package.json
file. To keep a consistent and comprehensive naming convention, name of classes for task types has been modified, as well as the name of the script
input property.
Steps
In build scripts:
- Rename imports and uses of class
RunCorepack
toRunCorepackTaskType
. Rename thescript
input property toargs
. - Rename imports and uses of class
RunNode
toRunNodeTaskType
. Rename thescript
input property toargs
. - Rename imports and uses of class
RunNpm
toRunNpmTaskType
. Rename thescript
input property toargs
. - Rename imports and uses of class
RunPnpm
toRunPnpmTaskType
. Rename thescript
input property toargs
. - Rename imports and uses of class
RunYarn
toRunYarnTaskType
. Rename thescript
input property toargs
. - Verify and eventually rename any custom task previously named
runNode
,runCorepack
,runNpm
,runPnpm
,runYarn
. These names are now reserved by some plugin tasks.
Example:
// Before upgrade
import org.siouan.frontendgradleplugin.infrastructure.gradle.RunNode
tasks.register<RunNode>("runNode") {
script.set("-v")
}
// After upgrade
import org.siouan.frontendgradleplugin.infrastructure.gradle.RunNodeTaskType
tasks.register<RunNodeTaskType>("getNodeVersion") {
args.set("-v")
}