Skip to content

Commit fb5781a

Browse files
committed
Update examples to KSP 2.0.0-1.0.25
1 parent 7bd60b3 commit fb5781a

File tree

5 files changed

+15
-9
lines changed

5 files changed

+15
-9
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
org.gradle.jvmargs=-Xmx2048M
2-
kotlinVersion=1.9.21
3-
kspVersion=1.9.21-1.0.15
2+
kotlinVersion=2.0.20
3+
kspVersion=2.0.20-1.0.25

examples/multiplatform/test-processor/src/main/kotlin/TestProcessor.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class TestProcessor(val codeGenerator: CodeGenerator, val logger: KSPLogger) : S
1717
codeGenerator.createNewFile(Dependencies.ALL_FILES, "", "Foo", "kt").use { output ->
1818
OutputStreamWriter(output).use { writer ->
1919
writer.write("package com.example\n\n")
20-
writer.write("class Foo {\n")
20+
writer.write("actual class Foo {\n")
2121

2222
val visitor = ClassVisitor()
2323
resolver.getAllFiles().forEach {
@@ -41,7 +41,7 @@ class ClassVisitor : KSTopDownVisitor<OutputStreamWriter, Unit>() {
4141
) {
4242
super.visitClassDeclaration(classDeclaration, data)
4343
val symbolName = classDeclaration.simpleName.asString().lowercase()
44-
data.write(" val $symbolName = true\n")
44+
data.write(" actual val $symbolName = true\n")
4545
}
4646
}
4747

examples/multiplatform/workload/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ kotlin {
4141
}
4242

4343
dependencies {
44-
add("kspCommonMainMetadata", project(":test-processor"))
44+
// add("kspCommonMainMetadata", project(":test-processor"))
4545
add("kspJvm", project(":test-processor"))
4646
add("kspJvmTest", project(":test-processor"))
4747
add("kspJs", project(":test-processor"))
@@ -51,9 +51,9 @@ dependencies {
5151
add("kspAndroidNativeArm64", project(":test-processor"))
5252
add("kspAndroidNativeArm64Test", project(":test-processor"))
5353
add("kspLinuxX64", project(":test-processor"))
54-
add("kspLinuxX64Test", project(":test-processor"))
54+
// add("kspLinuxX64Test", project(":test-processor"))
5555
add("kspMingwX64", project(":test-processor"))
56-
add("kspMingwX64Test", project(":test-processor"))
56+
// add("kspMingwX64Test", project(":test-processor"))
5757

5858
// The universal "ksp" configuration has performance issue and is deprecated on multiplatform since 1.0.1
5959
// ksp(project(":test-processor"))
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
package com.example
22

3+
expect class Foo() {
4+
val foo: Boolean
5+
val bar: Boolean
6+
val baz: Boolean
7+
}
8+
39
class Bar {
410
val baz = Foo().baz
511
}

examples/playground/gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
kotlin.code.style=official
2-
kotlinVersion=1.9.21
3-
kspVersion=1.9.21-1.0.15
2+
kotlinVersion=2.0.20
3+
kspVersion=2.0.20-1.0.25

0 commit comments

Comments
 (0)