Skip to content

Commit 3c83024

Browse files
authored
Add support for Kotlin 2.3.0 (#1038)
1 parent 9866194 commit 3c83024

6 files changed

Lines changed: 20 additions & 14 deletions

File tree

gradle/libs.versions.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ coroutines = "1.8.1"
66
detekt = "1.23.8"
77
junit = "4.13.2"
88
kctfork = "0.11.1"
9-
kotlin = "2.2.21"
9+
kotlin = "2.3.0"
1010
kotlinx = "1.10.2"
1111
kotlinPoet = "2.2.0"
12-
kspVersion = "2.3.4"
12+
kspVersion = "2.3.5"
1313

1414
groupId = "de.jensklingenberg.ktorfit"
15-
ktorfit = "2.7.2"
16-
ktorfitKsp = "2.7.2"
17-
ktorfitCompiler = "2.3.2" #Don't confuse this with the Kotlin version
18-
ktorfitCallConverter = "2.7.2"
19-
ktorfitFlowConverter = "2.7.2"
20-
ktorfitResponseConverter = "2.7.2"
21-
ktorfitGradle = "2.7.2"
15+
ktorfit = "2.7.3"
16+
ktorfitKsp = "2.7.3"
17+
ktorfitCompiler = "2.3.4" #Don't confuse this with the Kotlin version
18+
ktorfitCallConverter = "2.7.3"
19+
ktorfitFlowConverter = "2.7.3"
20+
ktorfitResponseConverter = "2.7.3"
21+
ktorfitGradle = "2.7.3"
2222

2323
ktorfitGradlePlugin = "2.7.1"
2424
ktorVersion = "3.3.3"

ktorfit-compiler-plugin/src/main/java/de/jensklingenberg/ktorfit/CommonCompilerPluginRegistrar.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import org.jetbrains.kotlin.config.CompilerConfiguration
1111
@OptIn(ExperimentalCompilerApi::class)
1212
@AutoService(CompilerPluginRegistrar::class)
1313
class CommonCompilerPluginRegistrar : CompilerPluginRegistrar() {
14+
override val pluginId: String = PLUGIN_ID
15+
1416
override val supportsK2: Boolean
1517
get() = true
1618

@@ -25,4 +27,8 @@ class CommonCompilerPluginRegistrar : CompilerPluginRegistrar() {
2527
KtorfitIrGenerationExtension(DebugLogger(logging, messageCollector)),
2628
)
2729
}
30+
31+
companion object {
32+
const val PLUGIN_ID = "ktorfitPlugin"
33+
}
2834
}

ktorfit-compiler-plugin/src/main/java/de/jensklingenberg/ktorfit/CreateFuncTransformer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ internal class CreateFuncTransformer(
3232
fun errorImplNotFound(
3333
implName: String,
3434
className: String,
35-
) = "$implName not found, did you apply the Ksp Ktorfit plugin? Make sure that it's applied after the KSP Gradle plugin. Use .create$className() instead"
35+
) = "$implName not found, did you apply the Ksp Ktorfit plugin? Use .create$className() instead"
3636

3737
fun errorClassNotFound(implName: String) = "class $implName not found, did you apply the Ksp Ktorfit plugin?"
3838

ktorfit-compiler-plugin/src/main/java/de/jensklingenberg/ktorfit/ExampleCommandLineProcessor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import org.jetbrains.kotlin.config.CompilerConfigurationKey
1111
@OptIn(ExperimentalCompilerApi::class)
1212
@AutoService(CommandLineProcessor::class) // don't forget!
1313
class ExampleCommandLineProcessor : CommandLineProcessor {
14-
override val pluginId: String = "ktorfitPlugin"
14+
override val pluginId: String = CommonCompilerPluginRegistrar.PLUGIN_ID
1515

1616
override val pluginOptions: Collection<CliOption> =
1717
listOf(

ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitCompilerSubPlugin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ internal class KtorfitCompilerSubPlugin : KotlinCompilerPluginSupportPlugin {
7777

7878
private fun defaultCompilerPluginVersion(projectKotlinVersion: KotlinVersion): String {
7979
return when {
80-
projectKotlinVersion.isAtLeast(2, 3) -> "2.3.3"
80+
projectKotlinVersion.isAtLeast(2, 3) -> "2.3.4"
8181
else -> KTORFIT_COMPILER_PLUGIN_VERSION
8282
}
8383
}

ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitGradlePlugin.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class KtorfitGradlePlugin : Plugin<Project> {
2222
const val GROUP_NAME = "de.jensklingenberg.ktorfit"
2323
const val ARTIFACT_NAME = "compiler-plugin"
2424
const val COMPILER_PLUGIN_ID = "ktorfitPlugin"
25-
const val KTORFIT_KSP_PLUGIN_VERSION = "2.7.2"
26-
const val KTORFIT_COMPILER_PLUGIN_VERSION = "2.3.2"
25+
const val KTORFIT_KSP_PLUGIN_VERSION = "2.7.3"
26+
const val KTORFIT_COMPILER_PLUGIN_VERSION = "2.3.4"
2727
const val MIN_KSP_VERSION = "2.0.2"
2828
val MIN_KOTLIN_VERSION = KotlinVersion(2, 2, 0)
2929
}

0 commit comments

Comments
 (0)