aboutsummaryrefslogtreecommitdiff
path: root/buildSrc/build.gradle.kts
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-07-03 01:16:24 -0700
committerGitHub <noreply@github.com>2019-07-03 01:16:24 -0700
commit250b7621c6f10bfd9f1cb14059a7d196263b7cb4 (patch)
tree36f46cbee21dcdb00fee8bc09f4f4d1268258c4a /buildSrc/build.gradle.kts
parent8d47328de7533d05ad654d7c893974f0687f21d9 (diff)
parent25d84867731a2995f8cc9cdf1734e1cd3e474323 (diff)
downloadfrost-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 'buildSrc/build.gradle.kts')
-rw-r--r--buildSrc/build.gradle.kts17
1 files changed, 15 insertions, 2 deletions
diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts
index 0c518118..2f2f5d15 100644
--- a/buildSrc/build.gradle.kts
+++ b/buildSrc/build.gradle.kts
@@ -9,15 +9,28 @@ repositories {
maven("https://jitpack.io")
}
+var isRoot = false
// Currently can't read properties from root project
// Reading it manually since it's simple
val rootProps =
- File(project.rootDir.let { if (it.name == "buildSrc") it.parent else it.absolutePath }, "gradle.properties")
+ File(
+ project.rootDir.let {
+ if (it.name == "buildSrc") {
+ it.parent
+ } else {
+ isRoot = true
+ it.absolutePath
+ }
+ },
+ "gradle.properties"
+ )
val kau = rootProps.useLines {
it.first { s -> s.startsWith("KAU=") }
}.substring(4).trim()
-println("Using kau $kau")
+if (isRoot) {
+ println("Using kau $kau")
+}
dependencies {
implementation("ca.allanwang.kau:gradle-plugin:$kau")