aboutsummaryrefslogtreecommitdiffhomepage
path: root/settings.gradle.kts
diff options
context:
space:
mode:
authorJason <[email protected]>2022-11-20 11:26:20 -0700
committerGitHub <[email protected]>2022-11-20 11:26:20 -0700
commit4a3ae595357d8c6c48938d889d199b50f09221e5 (patch)
treee640b5f2112c7a692e98da0fcbb8949c39156cba /settings.gradle.kts
parentb95d4b28b806ace2d61e9fe0bb13cede4a5e8847 (diff)
downloadPaper-4a3ae595357d8c6c48938d889d199b50f09221e5.tar.gz
Paper-4a3ae595357d8c6c48938d889d199b50f09221e5.zip
[ci skip] Add check for git repo (#8578)
Diffstat (limited to 'settings.gradle.kts')
-rw-r--r--settings.gradle.kts20
1 files changed, 20 insertions, 0 deletions
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 18cf95a321..189e95819a 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -1,5 +1,25 @@
import java.util.Locale
+if (!file(".git").isDirectory) {
+ 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
+
+ See https://github.com/PaperMC/Paper/blob/master/CONTRIBUTING.md
+ for further information on building and modifying Paper.
+ ===================================================
+ """.trimIndent()
+ error(errorText)
+}
+
pluginManagement {
repositories {
gradlePluginPortal()