2023-02-19 03:31:44 +01:00
|
|
|
@file:Suppress("UnstableApiUsage")
|
|
|
|
|
2023-01-07 08:27:10 +01:00
|
|
|
dependencyResolutionManagement {
|
2023-02-28 07:23:47 +01:00
|
|
|
includeBuild("build-src")
|
2023-02-06 07:58:02 +01:00
|
|
|
|
|
|
|
versionCatalogs {
|
|
|
|
create("settings") {
|
|
|
|
from(files("gradle/settings.versions.toml"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories.gradlePluginPortal()
|
2023-01-07 08:27:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
pluginManagement {
|
|
|
|
repositories {
|
2023-02-06 07:58:02 +01:00
|
|
|
gradlePluginPortal()
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-02-22 01:45:57 +01:00
|
|
|
val lowerCase = rootProject.name.lowercase()
|
2023-02-06 07:58:02 +01:00
|
|
|
|
|
|
|
include("core")
|
|
|
|
project(":core").name = "$lowerCase-core"
|
|
|
|
|
2023-02-19 03:31:44 +01:00
|
|
|
listOf("spigot").forEach(::includePlatform)
|
2023-02-06 07:58:02 +01:00
|
|
|
|
|
|
|
fun includeProject(name: String) {
|
|
|
|
include(name) {
|
|
|
|
this.name = "$lowerCase-$name"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fun includePlatform(name: String) {
|
|
|
|
include(name) {
|
|
|
|
this.name = "$lowerCase-platform-$name"
|
|
|
|
this.projectDir = file("platforms/$name")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fun includeModule(name: String) {
|
|
|
|
include(name) {
|
|
|
|
this.name = "$lowerCase-module-$name"
|
|
|
|
this.projectDir = file("modules/$name")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fun includePlatformModule(name: String, platform: String) {
|
|
|
|
include(name) {
|
|
|
|
this.name = "$lowerCase-module-$platform-$name"
|
|
|
|
this.projectDir = file("modules/$platform/$name")
|
2023-01-07 08:27:10 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-02-06 07:58:02 +01:00
|
|
|
fun include(name: String, block: ProjectDescriptor.() -> Unit) {
|
|
|
|
include(name)
|
|
|
|
project(":$name").apply(block)
|
|
|
|
}
|