3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-14 20:10:05 +01:00
Paper/settings.gradle.kts
Jason Penilla 27fa5a6abc
MergedProperties POC for sharing properties between projects
This is an alternate way to share dependency versions between api & server to version catalogs (#9974), which have the problem where any catalog change that impacts the generated accessor ABI will cause the entire paperweight pipeline to run again (which makes it impractical for our use case)

If we decide to go forward with this, will need to merge https://github.com/PaperMC/paperweight/pull/226 and make a paperweight release first.
2023-11-28 19:34:06 -07:00

59 Zeilen
1.7 KiB
Plaintext

import java.util.Locale
pluginManagement {
repositories {
gradlePluginPortal()
mavenLocal()
maven("https://repo.papermc.io/repository/maven-public/")
}
}
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
}
if (!file(".git").exists()) {
val errorText = """
=====================[ ERROR ]=====================
The Paper project directory is not a properly cloned Git repository.
In order to build Paper from source you must clone
the Paper repository using Git, not download a code
zip from GitHub.
Built Paper jars are available for download at
https://papermc.io/downloads/paper
See https://github.com/PaperMC/Paper/blob/master/CONTRIBUTING.md
for further information on building and modifying Paper.
===================================================
""".trimIndent()
error(errorText)
}
rootProject.name = "paper"
for (name in listOf("Paper-API", "Paper-Server", "Paper-MojangAPI")) {
val projName = name.lowercase(Locale.ENGLISH)
include(projName)
findProject(":$projName")!!.projectDir = file(name)
}
mapOf("test-plugin.settings.gradle.kts" to """
// Uncomment to enable the test plugin module
// include(":test-plugin")
""".trimIndent(),
"paper-api-generator.settings.gradle.kts" to """
// Uncomment to enable the api generator module
// include(":paper-api-generator")
""".trimIndent()
).forEach { (fileName, text) ->
val settingsFile = file(fileName)
if (settingsFile.exists()) {
apply(from = settingsFile)
} else {
settingsFile.writeText(text + "\n")
}
}