Skip to content

Commit

Permalink
Rename isCompileKotlinTask function
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelmarhic committed Dec 16, 2023
1 parent 23b6984 commit 2f798d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/com/gaelmarhic/quadrant/QuadrantPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class QuadrantPlugin : Plugin<Project> {
afterEvaluate {
variants.all { variant ->
tasks.all { task ->
if (task.isCompileKotlinTask(variant)) {
if (task.isCompileOrKspKotlinTask(variant)) {
task.dependsOn(taskToBeRegistered)
}
}
Expand Down Expand Up @@ -107,7 +107,7 @@ class QuadrantPlugin : Plugin<Project> {

private fun BaseExtension.sourceSet(name: String) = sourceSets.getByName(name)

private fun <T : BaseVariant> Task.isCompileKotlinTask(variant: T): Boolean {
private fun <T : BaseVariant> Task.isCompileOrKspKotlinTask(variant: T): Boolean {
val variantName = variant.name.capitalize()
return name in listOf(
"compile${variantName}Kotlin",
Expand Down

0 comments on commit 2f798d6

Please sign in to comment.