mirror of https://github.com/cabaletta/baritone
cleanup
This commit is contained in:
parent
f549e0e2d4
commit
82436f30e1
116
build.gradle
116
build.gradle
|
@ -49,20 +49,19 @@ import baritone.gradle.task.CreateDistTask
|
||||||
import baritone.gradle.task.ProguardTask
|
import baritone.gradle.task.ProguardTask
|
||||||
import baritone.gradle.fabric.CreateVolderYarn
|
import baritone.gradle.fabric.CreateVolderYarn
|
||||||
|
|
||||||
import net.minecraftforge.gradle.userdev.tasks.GenerateSRG
|
|
||||||
import net.minecraftforge.gradle.userdev.tasks.RenameJarInPlace
|
import net.minecraftforge.gradle.userdev.tasks.RenameJarInPlace
|
||||||
import org.apache.tools.ant.taskdefs.condition.Os
|
import org.apache.tools.ant.taskdefs.condition.Os
|
||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
|
|
||||||
def mcpVersion = [channel: 'snapshot', version: '20201028-1.16.3']
|
def mcpVersion = [channel: 'snapshot', version: '20200515-1.15.1']
|
||||||
|
|
||||||
if (!getProject().hasProperty("baritone.fabric_build")) {
|
if (getProject().hasProperty("baritone.fabric_build")) {
|
||||||
|
CreateVolderYarn.genMappings("1.15.2", mcpVersion)
|
||||||
|
apply plugin: 'fabric-loom'
|
||||||
|
} else {
|
||||||
apply plugin: 'net.minecraftforge.gradle'
|
apply plugin: 'net.minecraftforge.gradle'
|
||||||
apply plugin: 'org.spongepowered.mixin'
|
apply plugin: 'org.spongepowered.mixin'
|
||||||
} else {
|
|
||||||
CreateVolderYarn.genMappings("1.16.4", mcpVersion)
|
|
||||||
apply plugin: 'fabric-loom'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -171,8 +170,20 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
if (!getProject().hasProperty("baritone.fabric_build")) {
|
if (getProject().hasProperty("baritone.fabric_build")) {
|
||||||
minecraft 'com.github.ImpactDevelopment:Vanilla:1.15.2'
|
minecraft "com.mojang:minecraft:1.15.2"
|
||||||
|
mappings fileTree(dir: "volderyarn", include: "**.jar")
|
||||||
|
modImplementation "net.fabricmc:fabric-loader:0.9.1+build.205"
|
||||||
|
|
||||||
|
// this makes it compile with the forge tweak stuff
|
||||||
|
implementation 'com.github.ImpactDevelopment:SimpleTweaker:1.2'
|
||||||
|
implementation('net.minecraft:launchwrapper:1.12') {
|
||||||
|
exclude module: 'lwjgl'
|
||||||
|
}
|
||||||
|
|
||||||
|
implementation 'com.google.code.findbugs:jsr305:3.0.2'
|
||||||
|
} else {
|
||||||
|
minecraft 'com.github.ImpactDevelopment:Vanilla:1.15.2'
|
||||||
|
|
||||||
runtime launchCompile('net.minecraft:launchwrapper:1.12') {
|
runtime launchCompile('net.minecraft:launchwrapper:1.12') {
|
||||||
exclude module: 'lwjgl'
|
exclude module: 'lwjgl'
|
||||||
|
@ -187,18 +198,6 @@ dependencies {
|
||||||
exclude module: 'commons-io'
|
exclude module: 'commons-io'
|
||||||
exclude module: 'log4j-core'
|
exclude module: 'log4j-core'
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
minecraft "com.mojang:minecraft:1.16.4"
|
|
||||||
mappings fileTree(dir: "volderyarn", include: "**.jar")
|
|
||||||
modImplementation "net.fabricmc:fabric-loader:0.9.1+build.205"
|
|
||||||
|
|
||||||
// this makes it compile with the forge tweak stuff
|
|
||||||
implementation 'com.github.ImpactDevelopment:SimpleTweaker:1.2'
|
|
||||||
implementation('net.minecraft:launchwrapper:1.12') {
|
|
||||||
exclude module: 'lwjgl'
|
|
||||||
}
|
|
||||||
|
|
||||||
implementation 'com.google.code.findbugs:jsr305:3.0.2'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.12'
|
||||||
|
@ -212,8 +211,8 @@ javadoc {
|
||||||
classpath += sourceSets.api.compileClasspath
|
classpath += sourceSets.api.compileClasspath
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!!getProject().hasProperty("baritone.fabric_build")) {
|
if (getProject().hasProperty("baritone.fabric_build")) {
|
||||||
|
// skidded from fabric-example-mod (comments and all)
|
||||||
tasks.withType(JavaCompile).configureEach {
|
tasks.withType(JavaCompile).configureEach {
|
||||||
// ensure that the encoding is set to UTF-8, no matter what the system default is
|
// ensure that the encoding is set to UTF-8, no matter what the system default is
|
||||||
// this fixes some edge cases with special characters not displaying correctly
|
// this fixes some edge cases with special characters not displaying correctly
|
||||||
|
@ -236,10 +235,15 @@ jar {
|
||||||
preserveFileTimestamps = false
|
preserveFileTimestamps = false
|
||||||
reproducibleFileOrder = true
|
reproducibleFileOrder = true
|
||||||
|
|
||||||
filesMatching("fabric.mod.json") {
|
if (getProject().hasProperty("baritone.fabric_build")) {
|
||||||
expand "version": version
|
filesMatching("fabric.mod.json") {
|
||||||
|
expand "version": version
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
exclude("fabric.mod.json")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
manifest {
|
manifest {
|
||||||
attributes(
|
attributes(
|
||||||
'MixinConfigs': 'mixins.baritone.json',
|
'MixinConfigs': 'mixins.baritone.json',
|
||||||
|
@ -270,38 +274,7 @@ File getClientJarFabric() {
|
||||||
.get()
|
.get()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!getProject().hasProperty("baritone.fabric_build")) {
|
if (getProject().hasProperty("baritone.fabric_build")) {
|
||||||
task copyMcJar(type: Copy) {
|
|
||||||
def mcJar = {getClientJar()}
|
|
||||||
|
|
||||||
from mcJar
|
|
||||||
into 'build/createMcSrgJar/'
|
|
||||||
rename {'client-srg.jar'}
|
|
||||||
}
|
|
||||||
|
|
||||||
task createSrgMc(type: RenameJarInPlace) {
|
|
||||||
setInput(new File(copyMcJar.getOutputs().getFiles().getSingleFile(), "client-srg.jar"))
|
|
||||||
setClasspath(files({getClientJar()}))
|
|
||||||
|
|
||||||
// fork
|
|
||||||
setMappingType(net.minecraftforge.gradle.common.util.MappingFile.Mapping.SEARGE)
|
|
||||||
setJarTask('trans alaska pipeline')
|
|
||||||
}
|
|
||||||
|
|
||||||
project.afterEvaluate {
|
|
||||||
createSrgMc.dependsOn(extractSrg, copyMcJar)
|
|
||||||
createSrgMc.setMappings(extractSrg.getOutput())
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
task proguard(type: ProguardTask, dependsOn: createSrgMc) { // TODO: dont need to create srg mc if doing notch build
|
|
||||||
url 'https://downloads.sourceforge.net/project/proguard/proguard/6.0/proguard6.0.3.zip'
|
|
||||||
extract 'proguard6.0.3/lib/proguard.jar'
|
|
||||||
}
|
|
||||||
|
|
||||||
task createDist(type: CreateDistTask, dependsOn: proguard)
|
|
||||||
|
|
||||||
} else {
|
|
||||||
task copyMcJar(type: Copy) {
|
task copyMcJar(type: Copy) {
|
||||||
def mcJar = {getClientJarFabric()}
|
def mcJar = {getClientJarFabric()}
|
||||||
|
|
||||||
|
@ -317,5 +290,36 @@ if (!getProject().hasProperty("baritone.fabric_build")) {
|
||||||
|
|
||||||
task createDist(type: CreateDistTask, dependsOn: proguard)
|
task createDist(type: CreateDistTask, dependsOn: proguard)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
task copyMcJar(type: Copy) {
|
||||||
|
def mcJar = {getClientJar()}
|
||||||
|
|
||||||
|
from mcJar
|
||||||
|
into 'build/createMcSrgJar/'
|
||||||
|
rename {'client-srg.jar'}
|
||||||
|
}
|
||||||
|
|
||||||
|
task createSrgMc(type: RenameJarInPlace) {
|
||||||
|
setInput(new File(copyMcJar.getOutputs().getFiles().getSingleFile(), "client-srg.jar"))
|
||||||
|
setClasspath(files({getClientJar()}))
|
||||||
|
|
||||||
|
// fork
|
||||||
|
setMappingType(net.minecraftforge.gradle.common.util.MappingFile.Mapping.SEARGE)
|
||||||
|
setJarTask('trans alaska pipeline')
|
||||||
|
}
|
||||||
|
|
||||||
|
project.afterEvaluate {
|
||||||
|
createSrgMc.dependsOn(extractSrg, copyMcJar)
|
||||||
|
createSrgMc.setMappings(extractSrg.getOutput())
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
task proguard(type: ProguardTask, dependsOn: createSrgMc) { // TODO: dont need to create srg mc if doing notch build
|
||||||
|
url 'https://downloads.sourceforge.net/project/proguard/proguard/6.0/proguard6.0.3.zip'
|
||||||
|
extract 'proguard6.0.3/lib/proguard.jar'
|
||||||
|
}
|
||||||
|
|
||||||
|
task createDist(type: CreateDistTask, dependsOn: proguard)
|
||||||
|
|
||||||
}
|
}
|
||||||
build.finalizedBy(createDist)
|
build.finalizedBy(createDist)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
"name": "Baritone",
|
"name": "Baritone",
|
||||||
"description": "Google Maps for Blockgame",
|
"description": "Google Maps for Blockgame",
|
||||||
"authors": [
|
"authors": [
|
||||||
"people"
|
"leijurv", "Brady"
|
||||||
],
|
],
|
||||||
"contact": {
|
"contact": {
|
||||||
"homepage": "https://github.com/cabaletta/baritone",
|
"homepage": "https://github.com/cabaletta/baritone",
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
"license": "LGPL-3.0",
|
"license": "LGPL-3.0",
|
||||||
"icon": "assets/modid/icon.png",
|
"icon": "assets/baritone/icon.png",
|
||||||
|
|
||||||
"environment": "*",
|
"environment": "*",
|
||||||
"entrypoints": {
|
"entrypoints": {
|
||||||
|
@ -27,8 +27,5 @@
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.7.4",
|
"fabricloader": ">=0.7.4",
|
||||||
"minecraft": "1.16.x"
|
"minecraft": "1.16.x"
|
||||||
},
|
|
||||||
"suggests": {
|
|
||||||
"another-mod": "*"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Binary file not shown.
Loading…
Reference in New Issue