53 lines
1.5 KiB
Groovy
53 lines
1.5 KiB
Groovy
plugins {
|
|
id 'base'
|
|
id "com.github.node-gradle.node" version "7.1.0"
|
|
}
|
|
|
|
group 'top.nxxy335.commentaiautopilot.ui'
|
|
|
|
// Use system pnpm directly — avoids Windows exit code 268435659
|
|
// caused by Gradle Worker Daemon / node-gradle downloading pnpm on Windows
|
|
node {
|
|
download = false
|
|
}
|
|
|
|
// Skip built-in pnpm tasks (they fail on Windows), replace with Exec-based tasks
|
|
tasks.named('pnpmSetup').configure { enabled = false }
|
|
tasks.named('pnpmInstall').configure { enabled = false }
|
|
|
|
tasks.register('uiInstall', Exec) {
|
|
group = 'build'
|
|
description = 'Install UI dependencies using system pnpm'
|
|
workingDir layout.projectDirectory
|
|
commandLine 'cmd', '/c', 'pnpm', 'install'
|
|
}
|
|
|
|
tasks.register('uiBuild', Exec) {
|
|
group = 'build'
|
|
description = 'Build the UI project using pnpm'
|
|
workingDir layout.projectDirectory
|
|
commandLine 'cmd', '/c', 'pnpm', 'run', 'build'
|
|
dependsOn uiInstall
|
|
inputs.dir(layout.projectDirectory.dir('src'))
|
|
inputs.files(fileTree(
|
|
dir: layout.projectDirectory,
|
|
includes: ['*.cjs', '*.ts', '*.js', '*.json', '*.yaml']))
|
|
outputs.dir(layout.buildDirectory.dir('dist'))
|
|
}
|
|
|
|
tasks.register('uiCheck', Exec) {
|
|
group = 'verification'
|
|
description = 'Run unit tests for the UI project using pnpm'
|
|
workingDir layout.projectDirectory
|
|
commandLine 'cmd', '/c', 'pnpm', 'run', 'test:unit'
|
|
dependsOn uiInstall
|
|
}
|
|
|
|
tasks.named('check') {
|
|
dependsOn tasks.named('uiCheck')
|
|
}
|
|
|
|
tasks.named('assemble') {
|
|
dependsOn tasks.named('uiBuild')
|
|
}
|