CrazyAuctions/settings.gradle.kts
2023-04-01 11:19:31 -04:00

56 lines
1.2 KiB
Plaintext

dependencyResolutionManagement {
versionCatalogs {
create("settings") {
from(files("gradle/settings.versions.toml"))
}
}
repositories.gradlePluginPortal()
}
pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
}
}
rootProject.name = "CrazyAuctions"
val lowerCase = rootProject.name.lowercase()
listOf("api").forEach(::includeProject)
listOf("paper").forEach(::includePlatform)
fun includeProject(name: String) {
include(name) {
this.name = "$lowerCase-$name"
}
}
fun includeModule(name: String) {
include(name) {
this.name = "$lowerCase-module-$name"
this.projectDir = file("modules/$name")
}
}
fun includePlatform(name: String) {
include(name) {
this.name = "$lowerCase-$name"
this.projectDir = file("platforms/$name")
}
}
fun includePlatformModule(name: String, platform: String) {
include(name) {
this.name = "$lowerCase-module-$platform-$name"
this.projectDir = file("modules/$platform/$name")
}
}
fun include(name: String, block: ProjectDescriptor.() -> Unit) {
include(name)
project(":$name").apply(block)
}