Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-14 20:10:05 +01:00
Clean up settings script
Dieser Commit ist enthalten in:
Ursprung
ada77b3a3b
Commit
3b94cc3546
@ -44,19 +44,21 @@ for (name in listOf("Paper-API", "Paper-Server", "Paper-MojangAPI")) {
|
|||||||
findProject(":$projName")!!.projectDir = file(name)
|
findProject(":$projName")!!.projectDir = file(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
mapOf("test-plugin.settings.gradle.kts" to """
|
optionalInclude("test-plugin")
|
||||||
// Uncomment to enable the test plugin module
|
optionalInclude("paper-api-generator")
|
||||||
// include(":test-plugin")
|
|
||||||
""".trimIndent(),
|
fun optionalInclude(name: String, op: (ProjectDescriptor.() -> Unit)? = null) {
|
||||||
"paper-api-generator.settings.gradle.kts" to """
|
val settingsFile = file("$name.settings.gradle.kts")
|
||||||
// Uncomment to enable the api generator module
|
|
||||||
// include(":paper-api-generator")
|
|
||||||
""".trimIndent()
|
|
||||||
).forEach { (fileName, text) ->
|
|
||||||
val settingsFile = file(fileName)
|
|
||||||
if (settingsFile.exists()) {
|
if (settingsFile.exists()) {
|
||||||
apply(from = settingsFile)
|
apply(from = settingsFile)
|
||||||
|
findProject(":$name")?.let { op?.invoke(it) }
|
||||||
} else {
|
} else {
|
||||||
settingsFile.writeText(text + "\n")
|
settingsFile.writeText(
|
||||||
|
"""
|
||||||
|
// Uncomment to enable the '$name' project
|
||||||
|
// include(":$name")
|
||||||
|
|
||||||
|
""".trimIndent()
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren