
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()
		maven(url = "https://maven.neoforged.net/releases")
	}
}

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.neoforged.net/releases") {
			name = "Neoforge"

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

		mavenCentral()
	}

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

		classpath(group = "net.neoforged.gradle", name = "userdev", version = forge_gradle_version)
		classpath(group = "net.neoforged.gradle", name = "mixin", version = forge_gradle_version)
		classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}")

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