Skip to content

Commit

Permalink
Do not use deprecated capitalization
Browse files Browse the repository at this point in the history
  • Loading branch information
MiSikora committed Dec 22, 2021
1 parent 6056b79 commit 3d4060f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ private fun TaskProvider<out Task>.contributeToAndroid(dir: File, project: Proje
}
kotlinSourceSet.srcDir(dir.toRelativeString(project.projectDir))
variant.addJavaSourceFoldersToModel(dir)
project.tasks.named("generate${variant.name.capitalize(Locale.ROOT)}Sources").configure {

fun String.titleCaseFirstChar() = replaceFirstChar {
if (it.isLowerCase()) it.titlecase(Locale.ROOT) else it.toString()
}

project.tasks.named("generate${variant.name.titleCaseFirstChar()}Sources").configure {
it.dependsOn(this)
}
}
Expand Down

0 comments on commit 3d4060f

Please sign in to comment.