diff options
author | Allan Wang <me@allanwang.ca> | 2019-07-03 01:16:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-03 01:16:24 -0700 |
commit | 250b7621c6f10bfd9f1cb14059a7d196263b7cb4 (patch) | |
tree | 36f46cbee21dcdb00fee8bc09f4f4d1268258c4a /app/build.gradle | |
parent | 8d47328de7533d05ad654d7c893974f0687f21d9 (diff) | |
parent | 25d84867731a2995f8cc9cdf1734e1cd3e474323 (diff) | |
download | frost-250b7621c6f10bfd9f1cb14059a7d196263b7cb4.tar.gz frost-250b7621c6f10bfd9f1cb14059a7d196263b7cb4.tar.bz2 frost-250b7621c6f10bfd9f1cb14059a7d196263b7cb4.zip |
Merge pull request #1466 from AllanWang/gradle-npm
Use npm from gradle
Diffstat (limited to 'app/build.gradle')
-rw-r--r-- | app/build.gradle | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/app/build.gradle b/app/build.gradle index 4efd7930..b21162f9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,6 +6,18 @@ apply plugin: 'kotlin-kapt' apply plugin: 'com.getkeepsafe.dexcount' apply plugin: 'com.gladed.androidgitversion' + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath "com.moowork.gradle:gradle-node-plugin:${Versions.nodeGradle}" + } +} + +apply plugin: com.moowork.gradle.node.NodePlugin + apply from: '../spotless.gradle' group = APP_GROUP @@ -167,6 +179,27 @@ android { } +node { + version = '12.4.0' + npmVersion = '6.9.0' + download = true + nodeModulesDir = file("${project.projectDir}/src/web") +} + +task npmCi(type: NpmTask) { + dependsOn npmSetup + npmCommand = ["ci"] +} + +task frostWebGen(type: NpmTask) { + dependsOn npmCi + group 'build' + description 'Generate Frost web assets' + args = ['run', 'compile'] +} + +preBuild.dependsOn(frostWebGen) + repositories { google() jcenter() |