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 a2390aae4..8eb88a814 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 @@ -86,20 +86,22 @@ class KtorfitGradlePlugin : Plugin { dependency, ) - dependencies.add( - "ksp${ - targetName.replaceFirstChar { - if (it.isLowerCase()) { - it.titlecase( - US, - ) - } else { - it.toString() + if (this.compilations.any { it.name == "test" }) { + dependencies.add( + "ksp${ + targetName.replaceFirstChar { + if (it.isLowerCase()) { + it.titlecase( + US, + ) + } else { + it.toString() + } } - } - }Test", - dependency, - ) + }Test", + dependency, + ) + } } kotlinExtension.sourceSets.named("commonMain").configure {