Show only modules with a readme extension in main readme

This commit is contained in:
Alexander Nozik 2023-01-12 11:20:03 +03:00
parent e2a342751d
commit 54e862681f

View File

@ -198,11 +198,10 @@ public open class KScienceProjectPlugin : Plugin<Project> {
val modulesString = buildString { val modulesString = buildString {
subprojects.forEach { subproject -> subprojects.forEach { subproject ->
val name = subproject.name // val name = subproject.name
val path = subproject.path.replaceFirst(":", "").replace(":", "/") subproject.extensions.findByType<KScienceReadmeExtension>()?.let { ext ->
val ext = subproject.extensions.findByType<KScienceReadmeExtension>() val path = subproject.path.replaceFirst(":", "").replace(":", "/")
appendLine("\n### [$name]($path)") appendLine("\n### [$path]($path)")
if (ext != null) {
appendLine("> ${ext.description}") appendLine("> ${ext.description}")
appendLine(">\n> **Maturity**: ${ext.maturity}") appendLine(">\n> **Maturity**: ${ext.maturity}")
val featureString = ext.featuresString(itemPrefix = "> - ", pathPrefix = "$path/") val featureString = ext.featuresString(itemPrefix = "> - ", pathPrefix = "$path/")
@ -283,7 +282,8 @@ public open class KScienceProjectPlugin : Plugin<Project> {
} }
plugins.withType(org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin::class.java) { plugins.withType(org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin::class.java) {
rootProject.the<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension>().lockFileDirectory = rootDir.resolve("gradle") rootProject.the<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension>().lockFileDirectory =
rootDir.resolve("gradle")
} }
} }