Skip to content

Commit

Permalink
Merge branch 'korlibs:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
JochenGuckSnk authored Oct 4, 2023
2 parents bdb371d + 2173e82 commit 2dc23f0
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 39 deletions.
31 changes: 1 addition & 30 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,29 +1,14 @@
import korlibs.korge.gradle.*
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent

plugins {
//alias(libs.plugins.korge)
//id("com.soywiz.korge") version "999.0.0.999"
id("com.soywiz.korge") version "4.0.8"
alias(libs.plugins.korge)
}

korge {
id = "org.korge.samples.mymodule"

// To enable all targets at once

//targetAll()

// To enable targets based on properties/environment variables
//targetDefault()

// To selectively enable targets

targetJvm()
targetJs()
targetDesktop()
targetDesktopCross()
targetIos()
targetAndroidDirect()
serializationJson()
Expand All @@ -33,20 +18,6 @@ dependencies {
add("commonMainApi", project(":deps"))
}

// @TODO: Remove after KorGE 4.0.1 is used
project.tasks.withType(org.gradle.api.tasks.testing.AbstractTestTask::class.java).all {
testLogging {
events = mutableSetOf(
//TestLogEvent.STARTED, TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.FAILED,
TestLogEvent.STANDARD_OUT, TestLogEvent.STANDARD_ERROR
)
exceptionFormat = TestExceptionFormat.FULL
showStackTraces = true
showStandardStreams = true
}
}
subprojects {
if (this.name == "luak") {
apply(plugin = "maven-publish")
Expand Down
3 changes: 3 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[plugins]
korge = { id = "com.soywiz.korge", version = "5.0.2" }
#korge = { id = "com.soywiz.korge", version = "999.0.0.999" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
27 changes: 20 additions & 7 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
pluginManagement { repositories { mavenLocal(); mavenCentral(); google(); gradlePluginPortal() } }

plugins {
//id("com.soywiz.kproject.settings") version "0.0.1-SNAPSHOT"
id("com.soywiz.kproject.settings") version "0.3.1"
pluginManagement {
repositories { mavenLocal(); mavenCentral(); google(); gradlePluginPortal() }
}

rootProject.name = "${rootDir.name}-example"
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() }) {
if (line.startsWith("#")) continue
if (line.startsWith("[plugins]")) plugins = true
if (plugins && line.startsWith("korge") && Regex("^korge\\s*=.*").containsMatchIn(line)) version = Regex("version\\s*=\\s*\"(.*?)\"").find(line)?.groupValues?.get(1) ?: error("Can't find korge version")
}
if (version.isEmpty()) error("Can't find korge version in $libsTomlFile")

repositories { mavenLocal(); mavenCentral(); google(); gradlePluginPortal() }

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

kproject("./deps")
apply(plugin = "com.soywiz.korge.settings")
2 changes: 1 addition & 1 deletion src/commonMain/kotlin/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class MainLuaScene : Scene() {
override suspend fun SContainer.sceneMain() {
val globals = createLuaGlobals()

val textStack = uiVerticalStack(padding = 8f, adjustSize = false).xy(10, 10)
val textStack = uiVerticalStack(padding = 8.0, adjustSize = false).xy(10, 10)

fun luaprintln(str: String) {
println("LUA_PRINTLN: $str")
Expand Down

0 comments on commit 2dc23f0

Please sign in to comment.