Skip to content

Commit

Permalink
Add check if "test" target exist #638
Browse files Browse the repository at this point in the history
  • Loading branch information
Foso committed Aug 29, 2024
1 parent c76517a commit f67c93d
Showing 1 changed file with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,22 @@ class KtorfitGradlePlugin : Plugin<Project> {
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 {
Expand Down

0 comments on commit f67c93d

Please sign in to comment.