2018-08-08 03:16:53 +00:00
|
|
|
/*
|
|
|
|
* This file is part of Baritone.
|
|
|
|
*
|
|
|
|
* Baritone is free software: you can redistribute it and/or modify
|
2018-09-17 22:11:40 +00:00
|
|
|
* it under the terms of the GNU Lesser General Public License as published by
|
2018-08-08 03:16:53 +00:00
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
2018-08-08 04:15:22 +00:00
|
|
|
* Baritone is distributed in the hope that it will be useful,
|
2018-08-08 03:16:53 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2018-09-17 22:11:40 +00:00
|
|
|
* GNU Lesser General Public License for more details.
|
2018-08-08 03:16:53 +00:00
|
|
|
*
|
2018-09-17 22:11:40 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
2018-08-08 03:16:53 +00:00
|
|
|
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2018-08-01 17:09:39 +00:00
|
|
|
group 'baritone'
|
2019-02-05 16:25:30 +00:00
|
|
|
version '1.1.1'
|
2018-08-01 17:09:39 +00:00
|
|
|
|
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
name = 'forge'
|
|
|
|
url = 'http://files.minecraftforge.net/maven'
|
|
|
|
}
|
|
|
|
maven {
|
|
|
|
name = 'SpongePowered'
|
|
|
|
url = 'http://repo.spongepowered.org/maven'
|
|
|
|
}
|
|
|
|
jcenter()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
|
|
|
|
classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-13 02:21:16 +00:00
|
|
|
|
|
|
|
import baritone.gradle.task.CreateDistTask
|
|
|
|
import baritone.gradle.task.ProguardTask
|
2018-10-12 22:56:09 +00:00
|
|
|
|
2018-08-01 17:09:39 +00:00
|
|
|
apply plugin: 'java'
|
2018-09-04 23:08:29 +00:00
|
|
|
apply plugin: 'net.minecraftforge.gradle.tweaker-client'
|
|
|
|
apply plugin: 'org.spongepowered.mixin'
|
2018-08-01 17:09:39 +00:00
|
|
|
|
|
|
|
sourceCompatibility = targetCompatibility = '1.8'
|
|
|
|
compileJava {
|
|
|
|
sourceCompatibility = targetCompatibility = '1.8'
|
2019-01-30 19:54:38 +00:00
|
|
|
options.encoding = "UTF-8" // allow emoji in comments :^)
|
2018-08-01 17:09:39 +00:00
|
|
|
}
|
|
|
|
|
2018-09-04 23:48:00 +00:00
|
|
|
sourceSets {
|
|
|
|
launch {
|
|
|
|
compileClasspath += main.compileClasspath + main.runtimeClasspath + main.output
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-08-01 17:09:39 +00:00
|
|
|
minecraft {
|
|
|
|
version = '1.12.2'
|
2018-11-04 23:09:40 +00:00
|
|
|
mappings = 'stable_39'
|
2019-02-05 03:01:01 +00:00
|
|
|
tweakClass = 'baritone.launch.BaritoneTweaker'
|
2018-08-01 17:09:39 +00:00
|
|
|
runDir = 'run'
|
2018-10-10 19:09:41 +00:00
|
|
|
|
|
|
|
// The sources jar should use SRG names not MCP to ensure compatibility with all mappings
|
|
|
|
makeObfSourceJar = true
|
2018-08-01 17:09:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
|
|
|
|
maven {
|
|
|
|
name = 'spongepowered-repo'
|
|
|
|
url = 'http://repo.spongepowered.org/maven/'
|
|
|
|
}
|
2018-10-11 19:53:20 +00:00
|
|
|
|
|
|
|
maven {
|
|
|
|
name = 'impactdevelopment-repo'
|
|
|
|
url = 'https://impactdevelopment.github.io/maven/'
|
|
|
|
}
|
2018-08-01 17:09:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2018-10-16 00:00:52 +00:00
|
|
|
runtime launchCompile('com.github.ImpactDevelopment:SimpleTweaker:1.2')
|
2018-09-04 23:48:00 +00:00
|
|
|
runtime launchCompile('org.spongepowered:mixin:0.7.11-SNAPSHOT') {
|
2018-08-01 17:09:39 +00:00
|
|
|
// Mixin includes a lot of dependencies that are too up-to-date
|
|
|
|
exclude module: 'launchwrapper'
|
|
|
|
exclude module: 'guava'
|
|
|
|
exclude module: 'gson'
|
|
|
|
exclude module: 'commons-io'
|
|
|
|
exclude module: 'log4j-core'
|
|
|
|
}
|
|
|
|
testImplementation 'junit:junit:4.12'
|
|
|
|
}
|
2018-08-26 06:45:33 +00:00
|
|
|
|
|
|
|
mixin {
|
2019-02-05 02:19:51 +00:00
|
|
|
defaultObfuscationEnv searge
|
2018-09-04 23:50:53 +00:00
|
|
|
add sourceSets.launch, 'mixins.baritone.refmap.json'
|
2018-08-26 06:45:33 +00:00
|
|
|
}
|
2018-09-04 23:48:00 +00:00
|
|
|
|
2018-12-04 01:37:54 +00:00
|
|
|
javadoc {
|
2019-01-28 19:56:44 +00:00
|
|
|
options.addStringOption('Xwerror', '-quiet') // makes the build fail on travis when there is a javadoc error
|
2019-01-28 20:06:26 +00:00
|
|
|
options.linkSource true
|
2019-01-30 19:54:38 +00:00
|
|
|
options.encoding "UTF-8" // allow emoji in comments :^)
|
2019-01-28 19:30:33 +00:00
|
|
|
source += sourceSets.api.allJava
|
|
|
|
classpath += sourceSets.api.compileClasspath
|
2018-12-04 01:37:54 +00:00
|
|
|
}
|
|
|
|
|
2018-09-04 23:48:00 +00:00
|
|
|
jar {
|
2018-09-11 18:29:54 +00:00
|
|
|
from sourceSets.launch.output, sourceSets.api.output
|
2018-10-07 23:07:35 +00:00
|
|
|
preserveFileTimestamps = false
|
|
|
|
reproducibleFileOrder = true
|
2018-09-04 23:48:00 +00:00
|
|
|
}
|
2018-10-12 22:56:09 +00:00
|
|
|
|
2019-02-05 02:05:05 +00:00
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
attributes(
|
|
|
|
'MixinConfigs': 'mixins.baritone.json'
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-12 22:56:09 +00:00
|
|
|
task proguard(type: ProguardTask) {
|
|
|
|
url 'https://downloads.sourceforge.net/project/proguard/proguard/6.0/proguard6.0.3.zip'
|
|
|
|
extract 'proguard6.0.3/lib/proguard.jar'
|
|
|
|
}
|
|
|
|
|
2018-10-13 02:21:16 +00:00
|
|
|
task createDist(type: CreateDistTask, dependsOn: proguard)
|
|
|
|
|
|
|
|
build.finalizedBy(createDist)
|