2019-02-22 18:12:04 -06:00
|
|
|
/*
|
|
|
|
|
* This file is part of Baritone.
|
|
|
|
|
*
|
|
|
|
|
* 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
|
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* Baritone is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU Lesser General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
|
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
2021-06-23 11:24:22 -06:00
|
|
|
|
2022-12-01 23:04:40 -07:00
|
|
|
allprojects {
|
2022-04-02 21:36:18 -07:00
|
|
|
apply plugin: 'java'
|
2022-12-01 23:04:40 -07:00
|
|
|
apply plugin: "xyz.wagyourtail.unimined"
|
2022-04-02 21:36:18 -07:00
|
|
|
apply plugin: "maven-publish"
|
2022-01-20 15:19:35 -07:00
|
|
|
|
2022-04-02 21:36:18 -07:00
|
|
|
archivesBaseName = rootProject.archives_base_name
|
2023-11-14 07:12:23 -07:00
|
|
|
|
2023-10-15 20:51:17 +02:00
|
|
|
def vers = ""
|
|
|
|
|
try {
|
|
|
|
|
vers = 'git describe --always --tags --first-parent --dirty'.execute().text.trim()
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
println "Version detection failed: " + e
|
|
|
|
|
}
|
2022-06-07 04:52:05 -06:00
|
|
|
if (!vers.startsWith("v")) {
|
|
|
|
|
println "using version number: " + rootProject.mod_version
|
|
|
|
|
version = rootProject.mod_version
|
|
|
|
|
} else {
|
|
|
|
|
version = vers.substring(1)
|
2023-10-15 20:51:17 +02:00
|
|
|
println "Detected version " + version
|
2019-02-22 18:12:04 -06:00
|
|
|
}
|
2022-04-02 21:36:18 -07:00
|
|
|
group = rootProject.maven_group
|
2021-06-16 02:12:47 -06:00
|
|
|
|
2024-06-16 23:46:27 -05:00
|
|
|
sourceCompatibility = targetCompatibility = JavaVersion.toVersion(project.java_version)
|
|
|
|
|
|
|
|
|
|
java {
|
|
|
|
|
toolchain {
|
|
|
|
|
languageVersion.set(JavaLanguageVersion.of(sourceCompatibility.majorVersion.toInteger()))
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-03-12 01:05:39 -05:00
|
|
|
|
2022-04-02 21:36:18 -07:00
|
|
|
repositories {
|
2022-04-04 20:10:25 -07:00
|
|
|
maven {
|
|
|
|
|
name = 'spongepowered-repo'
|
|
|
|
|
url = 'https://repo.spongepowered.org/repository/maven-public/'
|
|
|
|
|
}
|
2022-12-01 23:04:40 -07:00
|
|
|
maven {
|
|
|
|
|
name = 'fabric-maven'
|
|
|
|
|
url = 'https://maven.fabricmc.net/'
|
|
|
|
|
}
|
2022-04-02 21:36:18 -07:00
|
|
|
maven {
|
|
|
|
|
name = 'impactdevelopment-repo'
|
|
|
|
|
url = 'https://impactdevelopment.github.io/maven/'
|
2021-01-19 23:11:08 -07:00
|
|
|
}
|
2022-04-02 21:36:18 -07:00
|
|
|
maven {
|
|
|
|
|
name = "ldtteam"
|
|
|
|
|
url = "https://maven.parchmentmc.net/"
|
|
|
|
|
}
|
2022-04-16 03:22:53 -07:00
|
|
|
// for the newer version of launchwrapper
|
|
|
|
|
maven {
|
|
|
|
|
name = "multimc-maven"
|
|
|
|
|
url = "https://files.multimc.org/maven/"
|
|
|
|
|
metadataSources {
|
|
|
|
|
artifact()
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-04-02 21:36:18 -07:00
|
|
|
mavenCentral()
|
2023-08-17 17:36:22 -07:00
|
|
|
maven {
|
|
|
|
|
name = 'babbaj-repo'
|
|
|
|
|
url = 'https://babbaj.github.io/maven/'
|
2019-02-22 18:12:04 -06:00
|
|
|
}
|
2021-01-19 23:03:03 -07:00
|
|
|
}
|
2022-12-01 23:04:40 -07:00
|
|
|
|
|
|
|
|
dependencies {
|
2024-07-21 13:33:00 +02:00
|
|
|
compileOnly "org.spongepowered:mixin:${project.mixin_version}"
|
|
|
|
|
compileOnly "org.ow2.asm:asm:${project.asm_version}"
|
|
|
|
|
|
2024-01-23 08:18:58 -07:00
|
|
|
implementation "dev.babbaj:nether-pathfinder:${project.nether_pathfinder_version}"
|
2022-12-01 23:04:40 -07:00
|
|
|
}
|
|
|
|
|
|
2023-08-23 19:47:07 -06:00
|
|
|
unimined.minecraft(sourceSets.main, true) {
|
|
|
|
|
version rootProject.minecraft_version
|
|
|
|
|
|
|
|
|
|
mappings {
|
|
|
|
|
intermediary()
|
|
|
|
|
mojmap()
|
|
|
|
|
parchment("2023.06.26")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-01 23:04:40 -07:00
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
|
|
|
it.options.encoding = "UTF-8"
|
|
|
|
|
|
2024-06-16 23:46:27 -05:00
|
|
|
def targetVersion = project.java_version.toInteger()
|
2022-12-01 23:04:40 -07:00
|
|
|
if (JavaVersion.current().isJava9Compatible()) {
|
|
|
|
|
it.options.release = targetVersion
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-23 19:47:07 -06:00
|
|
|
unimined.minecraft {
|
2022-12-01 23:04:40 -07:00
|
|
|
runs.off = true
|
2023-08-23 19:47:07 -06:00
|
|
|
defaultRemapJar = false
|
2022-12-01 23:04:40 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
archivesBaseName = archivesBaseName + "-common"
|
|
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
|
api {
|
|
|
|
|
compileClasspath += main.compileClasspath
|
|
|
|
|
runtimeClasspath += main.runtimeClasspath
|
|
|
|
|
}
|
|
|
|
|
main {
|
|
|
|
|
compileClasspath += api.output
|
|
|
|
|
runtimeClasspath += api.output
|
|
|
|
|
}
|
|
|
|
|
test {
|
|
|
|
|
compileClasspath += main.compileClasspath + main.runtimeClasspath + main.output
|
|
|
|
|
runtimeClasspath += main.compileClasspath + main.runtimeClasspath + main.output
|
|
|
|
|
}
|
|
|
|
|
launch {
|
|
|
|
|
compileClasspath += main.compileClasspath + main.runtimeClasspath + main.output
|
|
|
|
|
runtimeClasspath += main.compileClasspath + main.runtimeClasspath + main.output
|
|
|
|
|
}
|
|
|
|
|
schematica_api {
|
|
|
|
|
compileClasspath += main.compileClasspath
|
|
|
|
|
runtimeClasspath += main.runtimeClasspath
|
|
|
|
|
}
|
|
|
|
|
main {
|
|
|
|
|
compileClasspath += schematica_api.output
|
|
|
|
|
runtimeClasspath += schematica_api.output
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
testImplementation 'junit:junit:4.13.2'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
jar {
|
|
|
|
|
from sourceSets.main.output, sourceSets.launch.output, sourceSets.api.output
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
javadoc {
|
|
|
|
|
options.addStringOption('Xwerror', '-quiet') // makes the build fail on travis when there is a javadoc error
|
|
|
|
|
options.linkSource true
|
|
|
|
|
options.encoding "UTF-8" // allow emoji in comments :^)
|
|
|
|
|
source = sourceSets.api.allJava
|
|
|
|
|
classpath += sourceSets.api.compileClasspath
|
2023-08-20 13:36:45 -07:00
|
|
|
}
|