aboutsummaryrefslogtreecommitdiff
path: root/buildSrc/build.gradle.kts
diff options
context:
space:
mode:
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")