Last active
December 28, 2019 09:35
-
-
Save sankita15/33628438339fd7ad4df15a63729fc0a6 to your computer and use it in GitHub Desktop.
Gradle task
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node { | |
version = '12.12.0' | |
yarnVersion = '1.15.2' | |
download = false | |
yarnWorkDir = file("${project.buildDir}/yarn") | |
nodeModulesDir = file("${project.projectDir}/../frontend") | |
} | |
task appYarnInstall(type: YarnTask) { | |
description = "Installs all dependencies from package.json" | |
workingDir = file("${project.projectDir}/../frontend") | |
args = ["install"] | |
} | |
task appYarnBuild(type: YarnTask) { | |
description = "Builds production version of the travel-mania frontend" | |
workingDir = file("${project.projectDir}/../frontend") | |
args = ["build"] | |
} | |
task copyWebApp(type: Copy) { | |
from "${project.projectDir}/../frontend/build/" | |
into "${project.buildDir}/resources/main/static/." | |
} | |
appYarnBuild.dependsOn appYarnInstall | |
copyWebApp.dependsOn appYarnBuild | |
compileJava.dependsOn copyWebApp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment