Skip to content

Commit

Permalink
Updated settings.gradle.kts
Browse files Browse the repository at this point in the history
  • Loading branch information
soywiz committed Oct 3, 2023
1 parent 907faf6 commit ac784cc
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ pluginManagement {
repositories { mavenLocal(); mavenCentral(); google(); gradlePluginPortal() }
}

// @TODO: Why can't we just use libs here? We can't even use a TOML parser since it is gradle internal, and we cannot load a library in a reasonably way here.
plugins {
val libsTomlFile = File("gradle/libs.versions.toml").readText()
buildscript {
val libsTomlFile = File(this.sourceFile?.parentFile, "gradle/libs.versions.toml").readText()
var plugins = false
var version = ""
for (line in libsTomlFile.lines().map { it.trim() }) {
Expand All @@ -14,5 +13,11 @@ plugins {
}
if (version.isEmpty()) error("Can't find korge version in $libsTomlFile")

id("com.soywiz.korge.settings") version version
repositories { mavenLocal(); mavenCentral(); google(); gradlePluginPortal() }

dependencies {
classpath("com.soywiz.korge.settings:com.soywiz.korge.settings.gradle.plugin:$version")
}
}

apply(plugin = "com.soywiz.korge.settings")

0 comments on commit ac784cc

Please sign in to comment.