93 lines
2.6 KiB
Text
93 lines
2.6 KiB
Text
import java.util.*
|
|
|
|
plugins {
|
|
id("fabric-loom") version "1.7-SNAPSHOT"
|
|
}
|
|
|
|
base {
|
|
archivesName = project.property("archives_base_name").toString()
|
|
version = project.property("mod_version").toString()
|
|
group = project.property("maven_group").toString()
|
|
}
|
|
|
|
repositories {
|
|
// Add repositories to retrieve artifacts from in here.
|
|
// You should only use this when depending on other mods because
|
|
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
|
|
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
|
|
// for more information about repositories.
|
|
|
|
maven("https://maven.meteordev.org/releases") {
|
|
name = "meteor-maven"
|
|
}
|
|
|
|
maven("https://maven.shrecked.dev/private") {
|
|
name = "shweccyMavenPrivate"
|
|
|
|
credentials(HttpHeaderCredentials::class) {
|
|
val alias = project.property("shweccy_maven_alias").toString()
|
|
val token = project.property("shweccy_maven_token").toString()
|
|
val basic = Base64.getEncoder().encodeToString("${alias}:${token}".toByteArray())
|
|
name = "Authorization"
|
|
value = "Basic $basic"
|
|
}
|
|
|
|
authentication {
|
|
create<HttpHeaderAuthentication>("header")
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
// To change the versions see the gradle.properties file
|
|
minecraft("com.mojang:minecraft:${project.property("minecraft_version")}")
|
|
mappings("net.fabricmc:yarn:${project.property("yarn_mappings")}:v2")
|
|
modImplementation("net.fabricmc:fabric-loader:${project.property("loader_version")}")
|
|
|
|
// Fabric API. This is technically optional, but you probably want it anyway.
|
|
modImplementation("net.fabricmc.fabric-api:fabric-api:${project.property("fabric_version")}")
|
|
|
|
modImplementation("dev.shrecked.sun:sorry_im_under_nda:${project.property("sun_version")}")
|
|
implementation("meteordevelopment:orbit:${project.property("orbit_version")}")
|
|
implementation("io.github.racoondog:norbit:${project.property("norbit_version")}")
|
|
}
|
|
|
|
tasks {
|
|
processResources {
|
|
inputs.property("version", project.version)
|
|
|
|
filesMatching("fabric.mod.json") {
|
|
expand(mapOf("version" to project.version)) {
|
|
escapeBackslash = true
|
|
}
|
|
}
|
|
}
|
|
|
|
jar {
|
|
from("LICENSE") {
|
|
rename { "${it}_${project.base.archivesName.get()}"}
|
|
}
|
|
}
|
|
|
|
withType<JavaCompile> {
|
|
options.encoding = "UTF-8"
|
|
options.release = 21
|
|
}
|
|
|
|
javadoc {
|
|
// disables annoying javadoc warnings, remove this if you care about those
|
|
(options as CoreJavadocOptions).addBooleanOption("Xdoclint:none", true)
|
|
}
|
|
|
|
java {
|
|
withSourcesJar()
|
|
withJavadocJar()
|
|
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(21)
|
|
}
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_21
|
|
targetCompatibility = JavaVersion.VERSION_21
|
|
}
|
|
}
|