Skip to content

Commit e6bf55c

Browse files
committed
Add sample project.
1 parent 6f1bd9b commit e6bf55c

File tree

8 files changed

+82
-1
lines changed

8 files changed

+82
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

sample/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
plugins {
2+
alias(libs.plugins.kotlinMultiplatform) apply false
3+
}

sample/gradle/libs.versions.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[versions]
2+
kotlin = "2.1.21"
3+
4+
[libraries]
5+
6+
[plugins]
7+
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
58.1 KB
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
plugins {
2+
alias(libs.plugins.kotlinMultiplatform)
3+
id("com.bennyhuo.kotlin.trimindent")
4+
}
5+
6+
kotlin {
7+
jvm()
8+
macosArm64 {
9+
binaries.executable()
10+
}
11+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/**
2+
* Created by benny.
3+
*/
4+
val s = """
5+
hello
6+
world
7+
!!!
8+
""".trimIndent()
9+
10+
val s2 = """
11+
$s
12+
hello2
13+
world2
14+
!!!
15+
""".trimIndent()
16+
17+
val s3 = " >>> $s2 <<<".trimIndent()
18+
19+
val string = """
20+
items:
21+
- 1
22+
- 2
23+
- 3
24+
""".trimIndent()
25+
26+
val items = listOf(1, 2, 3)
27+
val string2 = """
28+
items:
29+
${items.joinToString("\n") { " - $it" }}
30+
""".trimIndent()
31+
32+
fun main() {
33+
println(s)
34+
println(s2)
35+
println(s3)
36+
println(string)
37+
println(string2)
38+
}

sample/settings.gradle.kts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
pluginManagement {
2+
repositories {
3+
mavenCentral()
4+
gradlePluginPortal()
5+
}
6+
}
7+
8+
dependencyResolutionManagement {
9+
repositories {
10+
mavenCentral()
11+
gradlePluginPortal()
12+
}
13+
}
14+
15+
include(":multiplatform-app")
16+
17+
includeBuild("../")

0 commit comments

Comments
 (0)