
println("Running with Java ${System.getProperty("java.version")} on JVM: ${System.getProperty("java.vendor")} ${System.getProperty("java.vm.version")} (Architecture: ${System.getProperty("os.arch")})")

pluginManagement {
	repositories {
		gradlePluginPortal()
	}
}

plugins {
	id("org.gradle.toolchains.foojay-resolver-convention").version("0.5.0")
}

buildscript {
	repositories {
		// These repositories are only for Gradle plugins, put any other repositories in the repository block further below
		maven(url = "https://maven.minecraftforge.net") {
			name = "Minecraft Forge"

			content {
				includeGroup("net.minecraftforge.gradle")
				includeGroup("net.minecraftforge")
			}
		}

		maven(url = "https://repo.spongepowered.org/repository/maven-public/") {
			name = "Spongepowered"

			content {
				includeGroup("org.spongepowered")
			}
		}

		maven(url = "https://maven.parchmentmc.org") {
			name = "Parchment mappings"

			content {
				includeGroup("org.parchmentmc")
				includeGroup("org.parchmentmc.feather")
			}
		}

		mavenCentral()
	}

	dependencies {
		val kotlin_version: String by settings
		val forge_gradle_version: String by settings
		val mixingradle_version: String by settings
		val koremods_modlauncher_version: String by settings
		val koremods_script_version: String by settings

		classpath(group = "net.minecraftforge.gradle", name = "ForgeGradle", version = forge_gradle_version)
		classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}")
		classpath("org.spongepowered:mixingradle:${mixingradle_version}")

		classpath(group = "org.parchmentmc", name = "librarian", version = "1.+")

		classpath(group = "org.gradle.toolchains", name = "foojay-resolver", version = "0.5.0")
	}
}
