2019-06-07 20:52:55 +02:00
|
|
|
plugins {
|
|
|
|
`kotlin-dsl`
|
|
|
|
}
|
|
|
|
|
2019-06-07 20:55:59 +02:00
|
|
|
group = "com.pitchedapps"
|
|
|
|
|
2019-06-07 20:52:55 +02:00
|
|
|
repositories {
|
2022-09-16 00:34:34 +02:00
|
|
|
mavenCentral()
|
2019-06-07 20:52:55 +02:00
|
|
|
maven("https://jitpack.io")
|
|
|
|
}
|
|
|
|
|
2019-07-03 09:23:24 +02:00
|
|
|
var isRoot = false
|
2019-06-08 08:10:02 +02:00
|
|
|
// Currently can't read properties from root project
|
|
|
|
// Reading it manually since it's simple
|
|
|
|
val rootProps =
|
2019-07-03 04:59:59 +02:00
|
|
|
File(
|
2019-07-03 09:23:24 +02:00
|
|
|
project.rootDir.let {
|
|
|
|
if (it.name == "buildSrc") {
|
|
|
|
it.parent
|
|
|
|
} else {
|
|
|
|
isRoot = true
|
|
|
|
it.absolutePath
|
|
|
|
}
|
|
|
|
},
|
2019-07-03 04:59:59 +02:00
|
|
|
"gradle.properties"
|
|
|
|
)
|
2019-06-08 08:10:02 +02:00
|
|
|
val kau = rootProps.useLines {
|
|
|
|
it.first { s -> s.startsWith("KAU=") }
|
|
|
|
}.substring(4).trim()
|
|
|
|
|
2019-07-03 09:23:24 +02:00
|
|
|
if (isRoot) {
|
|
|
|
println("Using kau $kau")
|
|
|
|
}
|
2019-06-07 20:52:55 +02:00
|
|
|
|
|
|
|
dependencies {
|
2019-06-08 08:10:02 +02:00
|
|
|
implementation("ca.allanwang.kau:gradle-plugin:$kau")
|
2022-09-16 00:34:34 +02:00
|
|
|
}
|