Skip to content

Commit

Permalink
Replace commonMain with SourceSet constant
Browse files Browse the repository at this point in the history
  • Loading branch information
Foso committed Sep 9, 2024
1 parent 22183d3 commit 5c19369
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import org.gradle.api.Project
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
import org.jetbrains.kotlin.gradle.dsl.KotlinSingleTargetExtension
import org.jetbrains.kotlin.gradle.dsl.kotlinExtension
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.util.targets
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
import java.util.Locale.US
Expand Down Expand Up @@ -107,8 +108,10 @@ class KtorfitGradlePlugin : Plugin<Project> {
}
}

kotlinExtension.sourceSets.named("commonMain").configure {
kotlin.srcDir("${layout.buildDirectory.get()}/generated/ksp/metadata/commonMain/kotlin")
kotlinExtension.sourceSets.named(KotlinSourceSet.COMMON_MAIN_SOURCE_SET_NAME).configure {
kotlin.srcDir(
"${layout.buildDirectory.get()}/generated/ksp/metadata/${KotlinSourceSet.COMMON_MAIN_SOURCE_SET_NAME}/kotlin"
)
}
}

Expand Down

0 comments on commit 5c19369

Please sign in to comment.