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 8eb88a814..eb9eebb75 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 @@ -71,33 +71,25 @@ class KtorfitGradlePlugin : Plugin { kotlinExtension.targets.configureEach { if (targetName == "metadata") return@configureEach - dependencies.add( - "ksp${ - targetName.replaceFirstChar { - if (it.isLowerCase()) { - it.titlecase( - US, - ) - } else { - it.toString() - } + val capitalizedTargetName = + targetName.replaceFirstChar { + if (it.isLowerCase()) { + it.titlecase( + US, + ) + } else { + it.toString() } - }", + } + dependencies.add( + "ksp$capitalizedTargetName", dependency, ) if (this.compilations.any { it.name == "test" }) { dependencies.add( "ksp${ - targetName.replaceFirstChar { - if (it.isLowerCase()) { - it.titlecase( - US, - ) - } else { - it.toString() - } - } + capitalizedTargetName }Test", dependency, )