From eb6e32d992aa79bf1e0f03fd4c4c8290fbd805d4 Mon Sep 17 00:00:00 2001 From: Jens Klingenberg Date: Sun, 10 Nov 2024 14:12:50 +0100 Subject: [PATCH 1/2] Decouple Kotlin plugin version from Ktorfit version --- .../ktorfit/gradle/KtorfitCompilerSubPlugin.kt | 4 ++-- .../de/jensklingenberg/ktorfit/gradle/KtorfitGradlePlugin.kt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitCompilerSubPlugin.kt b/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitCompilerSubPlugin.kt index 7ff49041d..19121a8a3 100644 --- a/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitCompilerSubPlugin.kt +++ b/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitCompilerSubPlugin.kt @@ -3,7 +3,7 @@ package de.jensklingenberg.ktorfit.gradle import de.jensklingenberg.ktorfit.gradle.KtorfitGradlePlugin.Companion.ARTIFACT_NAME import de.jensklingenberg.ktorfit.gradle.KtorfitGradlePlugin.Companion.COMPILER_PLUGIN_ID import de.jensklingenberg.ktorfit.gradle.KtorfitGradlePlugin.Companion.GROUP_NAME -import de.jensklingenberg.ktorfit.gradle.KtorfitGradlePlugin.Companion.KTORFIT_VERSION +import de.jensklingenberg.ktorfit.gradle.KtorfitGradlePlugin.Companion.KTORFIT_PLUGIN_VERSION import de.jensklingenberg.ktorfit.gradle.KtorfitGradlePlugin.Companion.MIN_KOTLIN_VERSION import de.jensklingenberg.ktorfit.gradle.KtorfitGradlePlugin.Companion.SNAPSHOT import org.gradle.api.Project @@ -46,7 +46,7 @@ internal class KtorfitCompilerSubPlugin : KotlinCompilerPluginSupportPlugin { return SubpluginArtifact( groupId = GROUP_NAME, artifactId = ARTIFACT_NAME, - version = "${KTORFIT_VERSION}-${myproject.kotlinExtension.compilerVersion.get()}$SNAPSHOT", + version = "${KTORFIT_PLUGIN_VERSION}-${myproject.kotlinExtension.compilerVersion.get()}$SNAPSHOT", ) } diff --git a/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitGradlePlugin.kt b/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitGradlePlugin.kt index 8b7da5877..e2b6194b2 100644 --- a/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitGradlePlugin.kt +++ b/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitGradlePlugin.kt @@ -17,6 +17,7 @@ class KtorfitGradlePlugin : Plugin { const val ARTIFACT_NAME = "compiler-plugin" const val COMPILER_PLUGIN_ID = "ktorfitPlugin" const val KTORFIT_VERSION = "2.1.0" // remember to bump this version before any release! + const val KTORFIT_PLUGIN_VERSION = "2.1.0" const val SNAPSHOT = "" const val MIN_KSP_VERSION = "1.0.24" const val MIN_KOTLIN_VERSION = "2.0.0" From 2f678320991c658a88e74aaf355c6d0e58f4a36a Mon Sep 17 00:00:00 2001 From: Jens Klingenberg Date: Sun, 10 Nov 2024 14:18:26 +0100 Subject: [PATCH 2/2] Decouple Kotlin plugin version from Ktorfit version --- .../ktorfit/gradle/KtorfitCompilerSubPlugin.kt | 4 ++-- .../jensklingenberg/ktorfit/gradle/KtorfitGradlePlugin.kt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitCompilerSubPlugin.kt b/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitCompilerSubPlugin.kt index 19121a8a3..8414a6353 100644 --- a/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitCompilerSubPlugin.kt +++ b/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitCompilerSubPlugin.kt @@ -3,7 +3,7 @@ package de.jensklingenberg.ktorfit.gradle import de.jensklingenberg.ktorfit.gradle.KtorfitGradlePlugin.Companion.ARTIFACT_NAME import de.jensklingenberg.ktorfit.gradle.KtorfitGradlePlugin.Companion.COMPILER_PLUGIN_ID import de.jensklingenberg.ktorfit.gradle.KtorfitGradlePlugin.Companion.GROUP_NAME -import de.jensklingenberg.ktorfit.gradle.KtorfitGradlePlugin.Companion.KTORFIT_PLUGIN_VERSION +import de.jensklingenberg.ktorfit.gradle.KtorfitGradlePlugin.Companion.KTORFIT_COMPILER_PLUGIN_VERSION import de.jensklingenberg.ktorfit.gradle.KtorfitGradlePlugin.Companion.MIN_KOTLIN_VERSION import de.jensklingenberg.ktorfit.gradle.KtorfitGradlePlugin.Companion.SNAPSHOT import org.gradle.api.Project @@ -46,7 +46,7 @@ internal class KtorfitCompilerSubPlugin : KotlinCompilerPluginSupportPlugin { return SubpluginArtifact( groupId = GROUP_NAME, artifactId = ARTIFACT_NAME, - version = "${KTORFIT_PLUGIN_VERSION}-${myproject.kotlinExtension.compilerVersion.get()}$SNAPSHOT", + version = "${KTORFIT_COMPILER_PLUGIN_VERSION}-${myproject.kotlinExtension.compilerVersion.get()}$SNAPSHOT", ) } diff --git a/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitGradlePlugin.kt b/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitGradlePlugin.kt index e2b6194b2..ea0b22ba5 100644 --- a/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitGradlePlugin.kt +++ b/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitGradlePlugin.kt @@ -16,8 +16,8 @@ class KtorfitGradlePlugin : Plugin { const val GROUP_NAME = "de.jensklingenberg.ktorfit" const val ARTIFACT_NAME = "compiler-plugin" const val COMPILER_PLUGIN_ID = "ktorfitPlugin" - const val KTORFIT_VERSION = "2.1.0" // remember to bump this version before any release! - const val KTORFIT_PLUGIN_VERSION = "2.1.0" + const val KTORFIT_KSP_PLUGIN_VERSION = "2.1.0" // remember to bump this version before any release! + const val KTORFIT_COMPILER_PLUGIN_VERSION = "2.1.0" const val SNAPSHOT = "" const val MIN_KSP_VERSION = "1.0.24" const val MIN_KOTLIN_VERSION = "2.0.0" @@ -79,7 +79,7 @@ class KtorfitGradlePlugin : Plugin { } } } - val dependency = "$ktorfitKsp:$KTORFIT_VERSION-$kspVersion$SNAPSHOT" + val dependency = "$ktorfitKsp:$KTORFIT_KSP_PLUGIN_VERSION-$kspVersion$SNAPSHOT" when (val kotlinExtension = kotlinExtension) { is KotlinSingleTargetExtension<*> -> {