diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/isMainSourceSet.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/isMainSourceSet.kt index 15989217b32..e21e22bbd9c 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/isMainSourceSet.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/isMainSourceSet.kt @@ -5,6 +5,7 @@ import com.android.build.gradle.api.LibraryVariant import org.gradle.api.Project import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinJvmAndroidCompilation +import java.util.Locale internal fun Project.isMainSourceSet(sourceSet: KotlinSourceSet): Boolean { return isMainSourceSet(allCompilationsOf(sourceSet)) @@ -22,8 +23,7 @@ private fun isMainCompilation(compilation: KotlinCompilation): Boolean { return androidVariant is LibraryVariant || androidVariant is ApplicationVariant } } catch (e: NoSuchMethodError) { - // Kotlin Plugin version below 1.4 - return !compilation.name.toLowerCase().endsWith("test") + return !compilation.name.lowercase(Locale.getDefault()).endsWith("test") } return compilation.name == "main" }