File tree Expand file tree Collapse file tree 4 files changed +33
-7
lines changed
build-logic/src/main/kotlin Expand file tree Collapse file tree 4 files changed +33
-7
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ kotlin {
50
50
nativeMain {
51
51
dependencies {
52
52
api(libs.ktor.client.cio)
53
+ api(libs.kaml)
53
54
api(libs.kmp.appdirs)
54
55
api(libs.kfswatch)
55
56
// api(libs.arrow.suspendapp.ktor)
Original file line number Diff line number Diff line change
1
+ import com.charleskorn.kaml.Yaml
1
2
import dev.suresh.Greeting
2
3
import dev.suresh.flow.timerComposeFlow
3
4
import dev.suresh.http.MediaApiClient
4
5
import kotlin.reflect.typeOf
5
6
import kotlin.time.Duration
6
7
import kotlinx.coroutines.flow.take
7
8
import kotlinx.coroutines.runBlocking
9
+ import kotlinx.serialization.Serializable
8
10
9
11
data class ProcessResult (val code : Int , val rawOutput : String? )
10
12
@@ -40,8 +42,26 @@ fun main(args: Array<String>): Unit = runBlocking {
40
42
// MultiplatformSystem.readEnvironmentVariable()
41
43
42
44
val client = MediaApiClient ()
43
- val images = client.images()
44
- println (" Found ${images.size} images" )
45
+ try {
46
+ val images = client.images()
47
+ println (" Found ${images.size} images" )
48
+ } catch (e: Exception ) {
49
+ e.printStackTrace()
50
+ }
51
+
52
+ @Serializable data class Team (val leader : String , val members : List <String >)
53
+
54
+ val yaml =
55
+ Yaml .default.decodeFromString<Team >(
56
+ """
57
+ leader: Amy
58
+ members:
59
+ - Bob
60
+ - Cindy
61
+ - Dan
62
+ """
63
+ .trimIndent())
64
+ println (yaml)
45
65
}
46
66
47
67
inline fun <reified T > prop (prop : T ): String {
Original file line number Diff line number Diff line change @@ -74,10 +74,9 @@ dokka {
74
74
separateInheritedMembers = false
75
75
mergeImplicitExpectActualDeclarations = false
76
76
77
- // val rootPath = rootProject.rootDir
78
- // customAssets.from(rootPath.resolve("app-logo.svg"))
79
- // customStyleSheets.from(rootPath.resolve("logo-styles.css"))
80
- // templatesDir = rootProject.file("dokka-templates")
77
+ // customAssets.from(rootDir.resolve("app-logo.svg"))
78
+ // customStyleSheets.from(rootDir.resolve("logo-styles.css"))
79
+ // templatesDir = rootDir.resolve("dokka-templates")
81
80
}
82
81
}
83
82
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ kopy = "0.12.0+2.0.21"
46
46
poko = " 0.17.2"
47
47
mappie = " 0.8.0"
48
48
akkurate = " 0.10.0"
49
+ kaml = " 0.62.0"
50
+ snakeyaml-engine-kmp = " 3.0.3"
49
51
konsist = " 0.16.1"
50
52
karakum = " 1.0.0-alpha.40-K2"
51
53
seskar = " 3.43.0"
@@ -91,7 +93,7 @@ logback-tyler = "1.0.0"
91
93
log4j = " 3.0.0-beta2"
92
94
jmh = " 1.37"
93
95
mrjar = " 0.1.1"
94
- ktfmt = " 0.52 "
96
+ ktfmt = " 0.53 "
95
97
google-javaformat = " 1.24.0"
96
98
palantir-javaformat = " 2.50.0"
97
99
google-auto-service = " 1.1.1"
@@ -432,6 +434,10 @@ expiringmap = { module = "net.jodah:expiringmap"
432
434
password4j = { module = " com.password4j:password4j" , version.ref = " password4j" }
433
435
otp-java = { module = " com.github.bastiaanjansen:otp-java" , version.ref = " otp" }
434
436
437
+ # Yaml
438
+ kaml = { module = " com.charleskorn.kaml:kaml" , version.ref = " kaml" }
439
+ snakeyaml-engine-kmp = { module = " it.krzeminski:snakeyaml-engine-kmp" , version.ref = " snakeyaml-engine-kmp" }
440
+
435
441
# Database IDs
436
442
sqids = { module = " org.sqids:sqids" , version.ref = " sqids" }
437
443
tsid = { module = " io.hypersistence:hypersistence-tsid" , version.ref = " tsid" }
You can’t perform that action at this time.
0 commit comments