forked from RepoMirrors/baritone
Small build.gradle cleanup and README update
This commit is contained in:
parent
3b46dbd6a1
commit
c808d5a42d
12
README.md
12
README.md
|
@ -34,6 +34,8 @@ Have committed at least once a day for the last 6 months =D 🦀
|
||||||
|
|
||||||
1Leijurv3DWTrGAfmmiTphjhXLvQiHg7K2
|
1Leijurv3DWTrGAfmmiTphjhXLvQiHg7K2
|
||||||
|
|
||||||
|
# Getting Started
|
||||||
|
|
||||||
Here are some links to help to get started:
|
Here are some links to help to get started:
|
||||||
|
|
||||||
- [Features](FEATURES.md)
|
- [Features](FEATURES.md)
|
||||||
|
@ -46,11 +48,15 @@ Here are some links to help to get started:
|
||||||
|
|
||||||
- [Settings](https://baritone.leijurv.com/baritone/api/Settings.html#allowBreak)
|
- [Settings](https://baritone.leijurv.com/baritone/api/Settings.html#allowBreak)
|
||||||
|
|
||||||
# Chat control
|
|
||||||
|
|
||||||
- [Baritone chat control usage](USAGE.md)
|
- [Baritone chat control usage](USAGE.md)
|
||||||
|
|
||||||
# API example
|
# API
|
||||||
|
|
||||||
|
The API is heavily documented, you can find the Javadocs for the latest release [here](https://baritone.leijurv.com/).
|
||||||
|
Please note that usage of anything located outside of the ``baritone.api`` package is not supported by the API release
|
||||||
|
jar.
|
||||||
|
|
||||||
|
Below is an example of basic usage for changing some settings, and then pathing to a X/Z goal.
|
||||||
|
|
||||||
```
|
```
|
||||||
BaritoneAPI.getSettings().allowSprint.value = true;
|
BaritoneAPI.getSettings().allowSprint.value = true;
|
||||||
|
|
266
build.gradle
266
build.gradle
|
@ -1,134 +1,132 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of Baritone.
|
* This file is part of Baritone.
|
||||||
*
|
*
|
||||||
* Baritone is free software: you can redistribute it and/or modify
|
* Baritone is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Baritone is distributed in the hope that it will be useful,
|
* Baritone is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Lesser General Public License for more details.
|
* GNU Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
|
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
group 'baritone'
|
group 'baritone'
|
||||||
version '1.1.6'
|
version '1.1.6'
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
name = 'forge'
|
name = 'forge'
|
||||||
url = 'http://files.minecraftforge.net/maven'
|
url = 'http://files.minecraftforge.net/maven'
|
||||||
}
|
}
|
||||||
maven {
|
maven {
|
||||||
name = 'SpongePowered'
|
name = 'SpongePowered'
|
||||||
url = 'http://repo.spongepowered.org/maven'
|
url = 'http://repo.spongepowered.org/maven'
|
||||||
}
|
}
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
|
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
|
||||||
classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
|
classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
import baritone.gradle.task.CreateDistTask
|
import baritone.gradle.task.CreateDistTask
|
||||||
import baritone.gradle.task.ProguardTask
|
import baritone.gradle.task.ProguardTask
|
||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'net.minecraftforge.gradle.tweaker-client'
|
apply plugin: 'net.minecraftforge.gradle.tweaker-client'
|
||||||
apply plugin: 'org.spongepowered.mixin'
|
apply plugin: 'org.spongepowered.mixin'
|
||||||
|
|
||||||
sourceCompatibility = targetCompatibility = '1.8'
|
sourceCompatibility = targetCompatibility = '1.8'
|
||||||
compileJava {
|
compileJava {
|
||||||
sourceCompatibility = targetCompatibility = '1.8'
|
sourceCompatibility = targetCompatibility = '1.8'
|
||||||
options.encoding = "UTF-8" // allow emoji in comments :^)
|
options.encoding = "UTF-8" // allow emoji in comments :^)
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
launch {
|
launch {
|
||||||
compileClasspath += main.compileClasspath + main.runtimeClasspath + main.output
|
compileClasspath += main.compileClasspath + main.runtimeClasspath + main.output
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
minecraft {
|
minecraft {
|
||||||
version = '1.12.2'
|
version = '1.12.2'
|
||||||
mappings = 'stable_39'
|
mappings = 'stable_39'
|
||||||
tweakClass = 'baritone.launch.BaritoneTweaker'
|
tweakClass = 'baritone.launch.BaritoneTweaker'
|
||||||
runDir = 'run'
|
runDir = 'run'
|
||||||
|
|
||||||
// The sources jar should use SRG names not MCP to ensure compatibility with all mappings
|
// The sources jar should use SRG names not MCP to ensure compatibility with all mappings
|
||||||
makeObfSourceJar = true
|
makeObfSourceJar = true
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
||||||
maven {
|
maven {
|
||||||
name = 'spongepowered-repo'
|
name = 'spongepowered-repo'
|
||||||
url = 'http://repo.spongepowered.org/maven/'
|
url = 'http://repo.spongepowered.org/maven/'
|
||||||
}
|
}
|
||||||
|
|
||||||
maven {
|
maven {
|
||||||
name = 'impactdevelopment-repo'
|
name = 'impactdevelopment-repo'
|
||||||
url = 'https://impactdevelopment.github.io/maven/'
|
url = 'https://impactdevelopment.github.io/maven/'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
runtime launchCompile('com.github.ImpactDevelopment:SimpleTweaker:1.2')
|
runtime launchCompile('com.github.ImpactDevelopment:SimpleTweaker:1.2')
|
||||||
runtime launchCompile('org.spongepowered:mixin:0.7.11-SNAPSHOT') {
|
runtime launchCompile('org.spongepowered:mixin:0.7.11-SNAPSHOT') {
|
||||||
// Mixin includes a lot of dependencies that are too up-to-date
|
// Mixin includes a lot of dependencies that are too up-to-date
|
||||||
exclude module: 'launchwrapper'
|
exclude module: 'launchwrapper'
|
||||||
exclude module: 'guava'
|
exclude module: 'guava'
|
||||||
exclude module: 'gson'
|
exclude module: 'gson'
|
||||||
exclude module: 'commons-io'
|
exclude module: 'commons-io'
|
||||||
exclude module: 'log4j-core'
|
exclude module: 'log4j-core'
|
||||||
}
|
}
|
||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.12'
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin {
|
mixin {
|
||||||
defaultObfuscationEnv searge
|
defaultObfuscationEnv searge
|
||||||
add sourceSets.launch, 'mixins.baritone.refmap.json'
|
add sourceSets.launch, 'mixins.baritone.refmap.json'
|
||||||
}
|
}
|
||||||
|
|
||||||
javadoc {
|
javadoc {
|
||||||
options.addStringOption('Xwerror', '-quiet') // makes the build fail on travis when there is a javadoc error
|
options.addStringOption('Xwerror', '-quiet') // makes the build fail on travis when there is a javadoc error
|
||||||
options.linkSource true
|
options.linkSource true
|
||||||
options.encoding "UTF-8" // allow emoji in comments :^)
|
options.encoding "UTF-8" // allow emoji in comments :^)
|
||||||
source += sourceSets.api.allJava
|
source += sourceSets.api.allJava
|
||||||
classpath += sourceSets.api.compileClasspath
|
classpath += sourceSets.api.compileClasspath
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
from sourceSets.launch.output, sourceSets.api.output
|
from sourceSets.launch.output, sourceSets.api.output
|
||||||
preserveFileTimestamps = false
|
preserveFileTimestamps = false
|
||||||
reproducibleFileOrder = true
|
reproducibleFileOrder = true
|
||||||
}
|
|
||||||
|
manifest {
|
||||||
jar {
|
attributes(
|
||||||
manifest {
|
'MixinConfigs': 'mixins.baritone.json',
|
||||||
attributes(
|
|
||||||
'MixinConfigs': 'mixins.baritone.json',
|
'Implementation-Title': 'Baritone',
|
||||||
|
'Implementation-Version': version
|
||||||
'Implementation-Title': 'Baritone',
|
)
|
||||||
'Implementation-Version': version
|
}
|
||||||
)
|
}
|
||||||
}
|
|
||||||
}
|
task proguard(type: ProguardTask) {
|
||||||
|
url 'https://downloads.sourceforge.net/project/proguard/proguard/6.0/proguard6.0.3.zip'
|
||||||
task proguard(type: ProguardTask) {
|
extract 'proguard6.0.3/lib/proguard.jar'
|
||||||
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)
|
||||||
|
|
||||||
task createDist(type: CreateDistTask, dependsOn: proguard)
|
build.finalizedBy(createDist)
|
||||||
|
|
||||||
build.finalizedBy(createDist)
|
|
||||||
|
|
Loading…
Reference in New Issue