2023-03-24 23:06:48 +08:00
|
|
|
import java.util.Locale
|
|
|
|
|
2021-06-12 20:09:34 +08:00
|
|
|
pluginManagement {
|
|
|
|
repositories {
|
|
|
|
gradlePluginPortal()
|
2022-12-14 05:27:38 +08:00
|
|
|
maven("https://repo.papermc.io/repository/maven-public/")
|
2021-06-12 20:09:34 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-01 09:26:08 +08:00
|
|
|
plugins {
|
|
|
|
id("org.gradle.toolchains.foojay-resolver-convention") version "0.4.0"
|
|
|
|
}
|
|
|
|
|
2023-04-20 23:28:39 +08:00
|
|
|
if (!file(".git").exists()) {
|
|
|
|
val errorText = """
|
|
|
|
|
|
|
|
=====================[ ERROR ]=====================
|
|
|
|
The Folia project directory is not a properly cloned Git repository.
|
|
|
|
|
|
|
|
In order to build Folia from source you must clone
|
|
|
|
the Folia repository using Git, not download a code
|
|
|
|
zip from GitHub.
|
|
|
|
|
|
|
|
See https://github.com/PaperMC/Paper/blob/master/CONTRIBUTING.md
|
|
|
|
for further information on building and modifying Paper and Forks.
|
|
|
|
===================================================
|
|
|
|
""".trimIndent()
|
|
|
|
error(errorText)
|
|
|
|
}
|
|
|
|
|
2023-03-23 19:53:58 +08:00
|
|
|
rootProject.name = "folia"
|
2021-06-12 20:09:34 +08:00
|
|
|
|
2023-03-24 23:06:48 +08:00
|
|
|
for (name in listOf("Folia-API", "Folia-Server")) {
|
|
|
|
val projName = name.lowercase(Locale.ENGLISH)
|
|
|
|
include(projName)
|
|
|
|
findProject(":$projName")!!.projectDir = file(name)
|
|
|
|
}
|