forked from cabaletta/baritone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
executable file
·155 lines (137 loc) · 4.54 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
/*
* 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/>.
*/
allprojects {
apply plugin: 'java'
apply plugin: "xyz.wagyourtail.unimined"
apply plugin: "maven-publish"
archivesBaseName = rootProject.archives_base_name
def vers = ""
try {
vers = 'git describe --always --tags --first-parent --dirty'.execute().text.trim()
} catch (Exception e) {
println "Version detection failed: " + e
}
if (!vers.startsWith("v")) {
println "using version number: " + rootProject.mod_version
version = rootProject.mod_version
} else {
version = vers.substring(1)
println "Detected version " + version
}
group = rootProject.maven_group
sourceCompatibility = targetCompatibility = JavaVersion.toVersion(project.java_version)
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(sourceCompatibility.majorVersion.toInteger()))
}
}
repositories {
maven {
name = 'spongepowered-repo'
url = 'https://repo.spongepowered.org/repository/maven-public/'
}
maven {
name = 'fabric-maven'
url = 'https://maven.fabricmc.net/'
}
maven {
name = 'impactdevelopment-repo'
url = 'https://impactdevelopment.github.io/maven/'
}
maven {
name = "ldtteam"
url = "https://maven.parchmentmc.net/"
}
// for the newer version of launchwrapper
maven {
name = "multimc-maven"
url = "https://files.multimc.org/maven/"
metadataSources {
artifact()
}
}
mavenCentral()
maven {
name = 'babbaj-repo'
url = 'https://babbaj.github.io/maven/'
}
}
dependencies {
compileOnly "org.spongepowered:mixin:${project.mixin_version}"
compileOnly "org.ow2.asm:asm:${project.asm_version}"
implementation "dev.babbaj:nether-pathfinder:${project.nether_pathfinder_version}"
}
unimined.minecraft(sourceSets.main, true) {
version rootProject.minecraft_version
mappings {
intermediary()
mojmap()
parchment("2023.06.26")
}
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
def targetVersion = project.java_version.toInteger()
if (JavaVersion.current().isJava9Compatible()) {
it.options.release = targetVersion
}
}
}
unimined.minecraft {
runs.off = true
defaultRemapJar = false
}
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
}