mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
[ci skip] add test plugin module
This commit is contained in:
@@ -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()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user