[ci skip] add test plugin module

This commit is contained in:
granny
2024-05-02 14:50:02 -07:00
parent 40392f28e4
commit 087d43d00b
7 changed files with 68 additions and 0 deletions

View File

@@ -37,3 +37,21 @@ for (name in listOf("Purpur-API", "Purpur-Server", "paper-api-generator")) {
include(projName)
findProject(":$projName")!!.projectDir = file(name)
}
optionalInclude("test-plugin")
fun optionalInclude(name: String, op: (ProjectDescriptor.() -> Unit)? = null) {
val settingsFile = file("$name.settings.gradle.kts")
if (settingsFile.exists()) {
apply(from = settingsFile)
findProject(":$name")?.let { op?.invoke(it) }
} else {
settingsFile.writeText(
"""
// Uncomment to enable the '$name' project
// include(":$name")
""".trimIndent()
)
}
}