2024-06-08 22:45:07 +02:00
|
|
|
|
|
|
|
import proguard.gradle.ProGuardTask
|
|
|
|
|
2023-08-26 16:19:12 +02:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
maven { url = 'https://maven.minecraftforge.net' }
|
|
|
|
maven { url = 'https://repo.spongepowered.org/repository/maven-public' }
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.1', changing: true
|
|
|
|
classpath "org.spongepowered:mixingradle:0.7.+"
|
2024-06-08 22:45:07 +02:00
|
|
|
classpath 'com.guardsquare:proguard-gradle:7.1.0'
|
2023-08-26 16:19:12 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: 'net.minecraftforge.gradle'
|
|
|
|
apply plugin: 'org.spongepowered.mixin'
|
|
|
|
apply plugin: 'eclipse'
|
|
|
|
apply plugin: 'idea'
|
|
|
|
apply plugin: 'java'
|
|
|
|
|
|
|
|
group = project.modGroup
|
|
|
|
version = project.modVersion
|
|
|
|
|
|
|
|
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
|
|
|
|
|
|
|
|
tasks.withType(JavaCompile) {
|
|
|
|
configure(options) {
|
|
|
|
options.compilerArgs.add("-XDignore.symbol.file=true")
|
|
|
|
options.encoding = 'utf-8'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
minecraft {
|
|
|
|
mappings channel: 'stable', version: '39-1.12'
|
|
|
|
|
|
|
|
runs {
|
|
|
|
client {
|
|
|
|
workingDirectory project.file('run')
|
|
|
|
|
|
|
|
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
|
|
|
property 'forge.logging.console.level', 'debug'
|
2024-06-12 11:05:23 +02:00
|
|
|
jvmArgs = ["-Dfml.coreMods.load=de.com.baseband.launcher.Tweaker", "-Xmx700M"]
|
|
|
|
args = ["-tweakClass", "de.com.baseband.launcher.Tweaker"]
|
2023-08-26 16:19:12 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
name = 'spongepowered-repo'
|
|
|
|
url = 'https://repo.spongepowered.org/maven'
|
|
|
|
}
|
|
|
|
|
|
|
|
maven {
|
|
|
|
name = "jitpack.io"
|
|
|
|
url = "https://jitpack.io"
|
|
|
|
}
|
|
|
|
|
|
|
|
mavenCentral()
|
2024-06-25 04:27:30 +02:00
|
|
|
|
|
|
|
maven { url = 'https://git.tudbut.de/api/packages/TudbuT/maven' }
|
|
|
|
maven { url = 'https://git.tudbut.de/api/packages/BaseBand/maven' }
|
2023-08-26 16:19:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
configurations {
|
|
|
|
jarLibs
|
2024-06-25 06:44:26 +02:00
|
|
|
reloadQuickly {
|
2024-06-25 05:35:36 +02:00
|
|
|
resolutionStrategy.cacheChangingModulesFor 60, 'seconds'
|
|
|
|
}
|
2023-08-26 16:19:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2860'
|
|
|
|
|
|
|
|
jarLibs('org.spongepowered:mixin:0.7.11-SNAPSHOT') {
|
|
|
|
exclude module: 'launchwrapper'
|
|
|
|
exclude module: 'guava'
|
|
|
|
exclude module: 'gson'
|
|
|
|
exclude module: 'commons-io'
|
|
|
|
exclude module: 'log4j-core'
|
|
|
|
}
|
|
|
|
|
2024-06-25 06:44:26 +02:00
|
|
|
reloadQuickly jarLibs('de.tudbut:tuddylib:+')
|
|
|
|
reloadQuickly jarLibs('de.com.baseband:ClientBoot:+')
|
2024-03-19 20:26:52 +01:00
|
|
|
|
2024-06-09 23:31:27 +02:00
|
|
|
//jarLibs(group: 'com.github.oshi', name: 'oshi-core', version: '1.+');
|
2024-03-19 20:26:52 +01:00
|
|
|
|
2023-08-26 16:19:12 +02:00
|
|
|
annotationProcessor('org.spongepowered:mixin:0.8.5:processor') {
|
|
|
|
exclude module: 'gson'
|
|
|
|
}
|
|
|
|
|
|
|
|
implementation configurations.jarLibs
|
|
|
|
}
|
|
|
|
|
|
|
|
processResources {
|
|
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
|
|
|
|
|
|
inputs.property 'version', project.version
|
|
|
|
inputs.property 'mcversion', '1.12.2'
|
|
|
|
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
|
|
include 'mcmod.info'
|
|
|
|
expand 'version': project.version, 'mcversion': '1.12.2'
|
|
|
|
}
|
|
|
|
|
|
|
|
from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' }
|
|
|
|
|
|
|
|
rename '(.+_at.cfg)', 'META-INF/$1'
|
|
|
|
}
|
|
|
|
|
|
|
|
mixin {
|
|
|
|
defaultObfuscationEnv 'searge'
|
|
|
|
add sourceSets.main, 'mixins.client.refmap.json'
|
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
|
|
|
|
|
|
manifest {
|
|
|
|
attributes(
|
2024-06-12 11:05:23 +02:00
|
|
|
'TweakClass': 'de.com.baseband.launcher.Tweaker',
|
2023-08-26 16:19:12 +02:00
|
|
|
'TweakOrder': 0,
|
|
|
|
'FMLCorePluginContainsFMLMod': 'true',
|
|
|
|
'ForceLoadAsMod': 'true'
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
from {
|
|
|
|
configurations.jarLibs.collect {
|
|
|
|
it.isDirectory() ? it : zipTree(it)
|
|
|
|
}
|
2023-09-20 13:19:35 +02:00
|
|
|
} {
|
|
|
|
exclude("mcmod.info")
|
2023-08-26 16:19:12 +02:00
|
|
|
}
|
2024-06-09 01:03:11 +02:00
|
|
|
|
2024-06-12 11:05:23 +02:00
|
|
|
archiveFileName = 'BaseBand-Loader.jar'
|
2024-06-08 22:45:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
def proguardBuildDir = "${buildDir}/proguard"
|
|
|
|
def proguardDir = "proguard"
|
|
|
|
|
|
|
|
tasks.register('proguard', ProGuardTask) {
|
|
|
|
|
|
|
|
dependsOn jar
|
|
|
|
|
|
|
|
configuration "${proguardDir}/proguard.cfg"
|
|
|
|
injars jar.archiveFile
|
|
|
|
outjars "${proguardBuildDir}/BaseBand-Loader.jar"
|
|
|
|
libraryjars "${proguardDir}/rt.jar"
|
|
|
|
libraryjars configurations.jarLibs
|
|
|
|
dump "${proguardBuildDir}/dump-Loader.txt"
|
|
|
|
printmapping "${proguardBuildDir}/mapping-Loader.txt"
|
|
|
|
printconfiguration "${proguardBuildDir}/configuration.txt"
|
2023-08-26 16:19:12 +02:00
|
|
|
}
|