Build: Generate human readable project name from gradle project id
This commit is contained in:
@@ -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() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user