Fix unnecessary usages of Locale.getDefault()
This commit is contained in:
committed by
Space
parent
a9479ec8d7
commit
7157a54155
@@ -131,7 +131,7 @@ fun Project.createGradleCommonSourceSet(): SourceSet {
|
||||
|
||||
// Common outputs will also produce '${project.name}.kotlin_module' file, so we need to avoid
|
||||
// files clash
|
||||
tasks.named<KotlinCompile>("compile${commonSourceSet.name.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() }}Kotlin") {
|
||||
tasks.named<KotlinCompile>("compile${commonSourceSet.name.replaceFirstChar { it.uppercase() }}Kotlin") {
|
||||
kotlinOptions {
|
||||
moduleName = "${this@createGradleCommonSourceSet.name}_${commonSourceSet.name}"
|
||||
}
|
||||
@@ -360,11 +360,7 @@ fun Project.createGradlePluginVariant(
|
||||
plugins.withId("org.jetbrains.dokka") {
|
||||
val dokkaTask = tasks.register<DokkaTask>(
|
||||
"dokka${
|
||||
variantSourceSet.javadocTaskName.replaceFirstChar {
|
||||
if (it.isLowerCase()) it.titlecase(
|
||||
Locale.getDefault()
|
||||
) else it.toString()
|
||||
}
|
||||
variantSourceSet.javadocTaskName.replaceFirstChar { it.uppercase() }
|
||||
}") {
|
||||
description = "Generates documentation in 'javadoc' format for '${variantSourceSet.javadocTaskName}' variant"
|
||||
|
||||
@@ -410,7 +406,7 @@ fun Project.createGradlePluginVariant(
|
||||
}
|
||||
|
||||
// KT-52138: Make module name the same for all variants, so KSP could access internal methods/properties
|
||||
tasks.named<KotlinCompile>("compile${variantSourceSet.name.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() }}Kotlin") {
|
||||
tasks.named<KotlinCompile>("compile${variantSourceSet.name.replaceFirstChar { it.uppercase() }}Kotlin") {
|
||||
kotlinOptions {
|
||||
moduleName = this@createGradlePluginVariant.name
|
||||
}
|
||||
@@ -470,7 +466,7 @@ fun Project.publishShadowedJar(
|
||||
val jarTask = tasks.named<Jar>(sourceSet.jarTaskName)
|
||||
|
||||
val shadowJarTask = embeddableCompilerDummyForDependenciesRewriting(
|
||||
taskName = "$EMBEDDABLE_COMPILER_TASK_NAME${sourceSet.jarTaskName.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() }}"
|
||||
taskName = "$EMBEDDABLE_COMPILER_TASK_NAME${sourceSet.jarTaskName.replaceFirstChar { it.uppercase() }}"
|
||||
) {
|
||||
setupPublicJar(
|
||||
jarTask.flatMap { it.archiveBaseName },
|
||||
|
||||
Reference in New Issue
Block a user