Build: Generate human readable project name from gradle project id

This commit is contained in:
Vyacheslav Gerasimov
2020-05-10 19:45:08 +03:00
parent b4df4e5525
commit f9ec4f7d5c
@@ -72,7 +72,8 @@ class KotlinBuildPublishingPlugin @Inject constructor(
pom { pom {
packaging = "jar" packaging = "jar"
description.set(project.description) name.set(humanReadableName(project))
description.set(project.description ?: humanReadableName(project))
url.set("https://kotlinlang.org/") url.set("https://kotlinlang.org/")
licenses { licenses {
license { license {
@@ -145,5 +146,8 @@ class KotlinBuildPublishingPlugin @Inject constructor(
const val COMPILE_CONFIGURATION = "publishedCompile" const val COMPILE_CONFIGURATION = "publishedCompile"
const val RUNTIME_CONFIGURATION = "publishedRuntime" const val RUNTIME_CONFIGURATION = "publishedRuntime"
fun humanReadableName(project: Project) =
project.name.split("-").joinToString(separator = " ") { it.capitalize() }
} }
} }