Skip to content

Commit

Permalink
chore(build): Use dynamic kotlin-version from gradle.properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayfri committed Aug 11, 2024
1 parent 68c388f commit a5de0c5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
val kotlinVersion = "2.0.10"
import java.util.*

plugins {
`kotlin-dsl`
Expand All @@ -10,12 +10,17 @@ repositories {
gradlePluginPortal()
}

val props = Properties().apply {
file("../gradle.properties").inputStream().use { load(it) }
}

fun version(target: String): String = props.getProperty("$target.version")

dependencies {
implementation(kotlin("gradle-plugin", kotlinVersion))
implementation(kotlin("gradle-plugin", version("kotlin")))
implementation(kotlin("script-runtime"))
implementation(kotlin("stdlib-jdk8"))
}

kotlin {
jvmToolchain(17)
}

0 comments on commit a5de0c5

Please sign in to comment.