2023-04-20 18:25:34 +02:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
2023-04-20 18:29:34 +02:00
|
|
|
mavenCentral()
|
2023-04-20 22:16:45 +02:00
|
|
|
maven { url = "https://maven.minecraftforge.net/" }
|
2023-04-20 18:25:34 +02:00
|
|
|
maven { url = "https://repo.spongepowered.org/repository/maven-public/" }
|
2023-04-20 22:16:45 +02:00
|
|
|
maven { url = "https://repo.viaversion.com" }
|
2023-04-20 18:25:34 +02:00
|
|
|
maven { url = "https://jitpack.io/" }
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
classpath "net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT"
|
|
|
|
classpath "org.spongepowered:mixingradle:0.6-SNAPSHOT"
|
|
|
|
classpath "com.github.johnrengelman:shadow:4.0.4"
|
|
|
|
}
|
2023-01-04 03:42:43 +01:00
|
|
|
}
|
2023-01-04 03:45:28 +01:00
|
|
|
|
2023-04-20 18:25:34 +02:00
|
|
|
apply plugin: "net.minecraftforge.gradle.forge"
|
|
|
|
apply plugin: "org.spongepowered.mixin"
|
|
|
|
apply plugin: "com.github.johnrengelman.shadow"
|
|
|
|
apply plugin: "java"
|
|
|
|
|
2023-01-04 03:45:28 +01:00
|
|
|
version = "1.8.9-${mod_version}"
|
|
|
|
group = "${mod_base_package}.${mod_id}"
|
|
|
|
archivesBaseName = mod_id
|
|
|
|
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
compileJava.options.encoding = 'UTF-8'
|
|
|
|
|
|
|
|
repositories {
|
2023-04-20 18:29:34 +02:00
|
|
|
mavenCentral()
|
2023-04-20 18:25:34 +02:00
|
|
|
maven { url = "https://maven.minecraftforge.net/" }
|
2023-01-04 03:45:28 +01:00
|
|
|
maven { url = "https://repo.spongepowered.org/repository/maven-public/" }
|
2023-04-20 22:16:45 +02:00
|
|
|
maven { url = "https://repo.viaversion.com" }
|
2023-01-04 03:45:28 +01:00
|
|
|
maven { url = "https://jitpack.io/" }
|
|
|
|
}
|
|
|
|
|
|
|
|
minecraft {
|
|
|
|
version = "1.8.9-11.15.1.2318-1.8.9"
|
|
|
|
runDir = "run"
|
2023-05-28 21:25:58 +02:00
|
|
|
mappings = "stable_20"
|
2023-01-04 03:45:28 +01:00
|
|
|
makeObfSourceJar = false
|
|
|
|
clientJvmArgs += ["-Dfml.coreMods.load=de.florianmichael.viaforge.mixin.MixinLoader"]
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main.java.srcDirs += 'src/main/java'
|
|
|
|
main.java.srcDirs += '../shared/main/java'
|
|
|
|
main.resources.srcDirs += '../shared/main/resources'
|
|
|
|
}
|
|
|
|
|
|
|
|
configurations {
|
|
|
|
include
|
|
|
|
implementation.extendsFrom(include)
|
|
|
|
}
|
|
|
|
|
|
|
|
def viaLibs = [
|
|
|
|
"com.viaversion:viaversion:${project.viaversion_version}",
|
|
|
|
"com.viaversion:viabackwards:${project.viabackwards_version}",
|
|
|
|
"com.viaversion:viarewind-core:${project.viarewind_version}",
|
2023-04-20 22:16:45 +02:00
|
|
|
"org.yaml:snakeyaml:${project.snake_yml_version}",
|
2023-01-04 03:45:28 +01:00
|
|
|
|
2023-05-28 21:25:58 +02:00
|
|
|
"net.raphimc:ViaLoader:${project.vialoader_version}"
|
2023-01-04 03:45:28 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile ("org.spongepowered:mixin:0.7.10-SNAPSHOT") {
|
|
|
|
exclude module: "launchwrapper"
|
|
|
|
}
|
|
|
|
include "org.spongepowered:mixin:0.7.10-SNAPSHOT"
|
|
|
|
|
|
|
|
for (final def via in viaLibs) {
|
|
|
|
include(via)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
processResources {
|
|
|
|
inputs.property "version", project.version
|
|
|
|
inputs.property "mcversion", project.minecraft.version
|
|
|
|
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
|
|
include 'mcmod.info'
|
|
|
|
|
|
|
|
expand 'version':project.version, 'mcversion':project.minecraft.version
|
|
|
|
}
|
|
|
|
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
|
|
exclude 'mcmod.info'
|
|
|
|
}
|
|
|
|
|
|
|
|
rename '(.+_at.cfg)', 'META-INF/$1'
|
|
|
|
}
|
|
|
|
|
|
|
|
mixin {
|
|
|
|
add sourceSets.main, "mixins.${mod_id}.refmap.json"
|
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
manifest.attributes(
|
|
|
|
"MixinConfigs": "mixins.viaforge.json",
|
|
|
|
"tweakClass": "org.spongepowered.asm.launch.MixinTweaker",
|
|
|
|
"TweakOrder": 0,
|
|
|
|
"FMLCorePluginContainsFMLMod": "de.florianmichael.viaforge.mixin.MixinLoader"
|
|
|
|
)
|
|
|
|
|
|
|
|
enabled = false
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: "idea"
|
|
|
|
|
|
|
|
idea {
|
|
|
|
module {
|
|
|
|
inheritOutputDirs = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
shadowJar {
|
|
|
|
archiveName = jar.archiveName
|
|
|
|
configurations = [project.configurations.include]
|
|
|
|
compileJava.options.encoding = "UTF-8"
|
|
|
|
exclude "native-binaries/*"
|
|
|
|
exclude "META-INF/versions/**"
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
for (final def lib in viaLibs) {
|
|
|
|
include(dependency(lib))
|
|
|
|
}
|
|
|
|
include(dependency("org.spongepowered:mixin:0.7.10-SNAPSHOT"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
reobf {
|
|
|
|
shadowJar {}
|
|
|
|
}
|
|
|
|
|
2023-04-20 22:16:45 +02:00
|
|
|
jar.dependsOn("shadowJar")
|