aboutsummaryrefslogtreecommitdiff
path: root/buildSrc
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-07-03 00:23:24 -0700
committerAllan Wang <me@allanwang.ca>2019-07-03 00:23:29 -0700
commit23295a5376aaf297487a352a1f3ddfe17f73691c (patch)
tree8b89b8bb47ae26e82a227a2ab5f3243b35b4b346 /buildSrc
parentd04007715ceefee07a67b64957a95040e5d1bf8d (diff)
downloadfrost-23295a5376aaf297487a352a1f3ddfe17f73691c.tar.gz
frost-23295a5376aaf297487a352a1f3ddfe17f73691c.tar.bz2
frost-23295a5376aaf297487a352a1f3ddfe17f73691c.zip
Only print kau if is root
Diffstat (limited to 'buildSrc')
-rw-r--r--buildSrc/build.gradle.kts14
1 files changed, 12 insertions, 2 deletions
diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts
index 38f9cd13..2f2f5d15 100644
--- a/buildSrc/build.gradle.kts
+++ b/buildSrc/build.gradle.kts
@@ -9,18 +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 },
+ 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")