From b46e2030d6069cb9abb66f02818283358ac06841 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Sun, 20 Nov 2022 11:26:20 -0700 Subject: [PATCH] [ci skip] Add check for git repo (#8578) --- settings.gradle.kts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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()