Features
- Task
resolvePackageManager
supports apackageManager
property whose value ends with a hash to allow an integrity check after download by Corepack (#271). - Task
cleanFrontend
was removed because it triggered tasksinstallNode
andinstallFrontend
, which was not intuitive and created latency when cleaning a project (#273).
Additional notes
- JDK 11 build will be abandoned in the next major release (11.0.0).
Upgrading from 9.0.0+
Breaking changes
After task cleanFrontend
and DSL property frontend.cleanScript
were removed, projects that were configuring this property to run a node-based command during Gradle clean
task must now register a custom task.
Steps
In build scripts, register a custom task:
// Before upgrade
frontend {
cleanScript.set(<clean-script>)
}
// After upgrade
// Solution 1 (recommended)
tasks.register<Delete>("cleanFrontend") {
delete(<file>, ...)
}
tasks.named("clean") {
dependsOn("cleanFrontend")
}
// Solution 2
import org.siouan.frontendgradleplugin.infrastructure.gradle.Run[Npm|Pnpm|Yarn]TaskType
tasks.register<Run[Npm|Pnpm|Yarn]TaskType>("cleanFrontend") {
args.set(<clean-script>)
dependsOn("installFrontend")
}
tasks.named("clean") {
dependsOn("cleanFrontend")
}