63 lines
1.4 KiB
Groovy
63 lines
1.4 KiB
Groovy
plugins {
|
|
id("com.github.node-gradle.node") version "3.0.1"
|
|
}
|
|
|
|
|
|
|
|
node {
|
|
// Version of node to use.
|
|
version = version_nodejs
|
|
|
|
// Version of npm to use. Uses the version included in nodejs if not set.
|
|
npmVersion = version_npm
|
|
|
|
// Version of Yarn to use.
|
|
//yarnVersion = '0.16.1'
|
|
|
|
// Base URL for fetching node distributions (change if you have a mirror).
|
|
//distBaseUrl = 'https://nodejs.org/dist'
|
|
|
|
// If true, it will download node using above parameters.
|
|
// If false, it will try to use globally installed node.
|
|
download = true
|
|
|
|
// Set the work directory for unpacking node
|
|
//workDir = file("${project.buildDir}/nodejs")
|
|
|
|
// Set the work directory for NPM
|
|
npmWorkDir = file("${project.buildDir}/npm")
|
|
|
|
// Set the work directory for Yarn
|
|
//yarnWorkDir = file("${project.buildDir}/yarn")
|
|
|
|
// Set the work directory where node_modules should be located
|
|
//nodeModulesDir = file("${project.projectDir}")
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
resources {
|
|
srcDir 'build/generated'
|
|
}
|
|
}
|
|
}
|
|
|
|
npm_run_build.inputs.dir("src").withPropertyName("sourceFiles")
|
|
npm_run_build.inputs.files(fileTree("src/templates") {
|
|
include "*.json"
|
|
include "*.js"
|
|
include "browserslist"
|
|
})
|
|
npm_run_build.outputs.dir("build/generated").withPropertyName("outputFiles")
|
|
|
|
|
|
jar.dependsOn 'npm_run_releasebuild'
|
|
|
|
jar {
|
|
from 'build/generated/resources' into 'resources'
|
|
}
|
|
|
|
dependencies {
|
|
|
|
}
|