-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathbuild.gradle
More file actions
210 lines (184 loc) · 6.36 KB
/
build.gradle
File metadata and controls
210 lines (184 loc) · 6.36 KB
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
plugins {
id 'idea'
id 'java'
id 'maven-publish'
id 'com.diffplug.spotless' version '8.1.0'
id 'com.gradleup.shadow' version '9.3.0'
id 'com.azuredoom.hytale-tools' version '1.0.26'
id 'com.azuredoom.hytalepublisher' version '1.1.1'
}
configurations {
shadowBundle
implementation.extendsFrom(shadowBundle)
}
javadoc {
options.addStringOption('Xdoclint:-missing', '-quiet')
}
group = project.group
java {
toolchain.languageVersion = JavaLanguageVersion.of(java_version)
withSourcesJar()
withJavadocJar()
}
repositories {
mavenCentral()
}
hytaleTools {
javaVersion = project.java_version as Integer
hytaleVersion = project.hytale_version.toString()
manifestGroup = project.manifest_group.toString()
modId = project.mod_id.toString()
modDescription = project.mod_description.toString()
modUrl = project.mod_url.toString()
mainClass = project.main_class.toString()
modCredits = project.mod_credits.toString()
manifestDependencies = project.manifest_dependencies.toString()
manifestOptionalDependencies = project.manifest_opt_dependencies.toString()
curseforgeId = project.curseforgeID.toString()
disabledByDefault = project.disabled_by_default.toString().toBoolean()
includesPack = project.includes_pack.toString().toBoolean()
patchline = project.patchline.toString()
}
dependencies {
implementation 'com.buuz135:MultipleHUD:1.0.7'
compileOnly 'curse.maven:partyinfo-1429469:7526614'
compileOnly 'curse.maven:partypro-1438292:7818004'
compileOnly 'curse.maven:hyui-1431415:7820303'
compileOnly 'curse.maven:placeholderlib-1438208:7540696'
compileOnly 'at.helpch:placeholderapi-hytale:1.0.8'
compileOnly 'curse.maven:dynamictooltipslib-1459711:7817318'
implementation 'com.azuredoom.classescore:Classescore:0.1.3-alpha.1'
implementation 'com.azuredoom.tagcore:TagCore:1.1.2'
compileOnly 'curse.maven:endgame-1431338:7826907'
compileOnly 'curse.maven:rpgmobs-1444529:7845829'
compileOnly 'curse.maven:elite-1441945:7566545'
//vineImplementation 'modtale:3e453e84-81af-46bf-9e7d-c7de99d9c4f0:0.1.0-alpha@jar'
shadowBundle 'com.h2database:h2:2.4.240'
shadowBundle('com.zaxxer:HikariCP:7.0.2') {
exclude group: 'org.slf4j', module: 'slf4j-simple'
}
shadowBundle 'org.slf4j:slf4j-api:2.0.17'
shadowBundle 'org.yaml:snakeyaml:2.5'
shadowBundle 'net.objecthunter:exp4j:0.4.8'
shadowBundle 'com.mysql:mysql-connector-j:9.5.0'
shadowBundle 'org.mariadb.jdbc:mariadb-java-client:3.5.7'
shadowBundle 'org.postgresql:postgresql:42.7.8'
}
spotless {
java {
eclipse().configFile("$rootDir/eclipse-formatter.xml")
endWithNewline()
importOrder("", "java", group.toString(), "\\#")
leadingTabsToSpaces(4)
removeUnusedImports()
trimTrailingWhitespace()
}
}
shadowJar {
archiveClassifier.set('')
mergeServiceFiles()
configurations = [project.configurations.shadowBundle]
manifest {
attributes(
'Main-Class': 'com.azuredoom.levelingcore.LevelingCore'
)
}
relocate 'com.zaxxer.hikari', 'com.azuredoom.levelingcore.libs.hikari'
relocate 'org.slf4j', 'com.azuredoom.levelingcore.libs.slf4j'
relocate 'org.yaml.snakeyaml', 'com.azuredoom.levelingcore.libs.snakeyaml'
relocate 'net.objecthunter.exp4j', 'com.azuredoom.levelingcore.libs.exp4j'
relocate 'com.mysql', 'com.azuredoom.levelingcore.libs.mysql'
relocate 'org.mariadb', 'com.azuredoom.levelingcore.libs.mariadb'
relocate 'org.postgresql', 'com.azuredoom.levelingcore.libs.postgresql'
}
tasks.build {
dependsOn("spotlessApply", "shadowJar")
}
publishing {
repositories {
maven {
name = project.mod_id
url = project.maven_url
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
}
maven {
name = "hmod"
url = project.hmod_maven_url
credentials {
username = project.findProperty("moddingMavenUsername")
password = project.findProperty("moddingMavenPassword")
}
authentication {
basic(BasicAuthentication)
}
}
}
publications {
maven(MavenPublication) {
artifactId = base.archivesName.get()
artifact(tasks.shadowJar)
artifact(tasks.sourcesJar)
artifact(tasks.javadocJar)
pom.withXml {
asNode().dependencies.dependency.each { dep ->
if (dep.groupId.text() == 'com.buuz135' || dep.groupId.text() == 'curse.maven') {
dep.parent().remove(dep)
}
}
}
}
}
}
idea {
module {
downloadSources = true
downloadJavadoc = true
}
}
hytalePublisher {
version = project.version
releaseType = "release"
changelogFile = "changelog.md"
gameVersion = project.hytale_version.toString()
modtale {
enabled = true
projectId = project.modtale_uuid
patchline = 'release'
optional "9e3f3c46-92e1-4f57-8702-4ec11d7d10b4", "1.10.2"
optional "2ebf130e-2189-4e90-9323-803a374d05ce", "1.5.2"
}
curseforge {
enabled = true
projectId = project.curseforgeID
required "multiplehud"
optional "dynamictooltipslib"
optional "update-checker"
optional "better-modlist"
optional "party-info"
optional "partypro"
optional "hyui"
optional "automultihud"
optional "placeholder-api"
optional "placeholderlib"
optional "docs"
optional "rpgmobs"
optional "elite-mobs"
optional "classescore"
}
modifold {
enabled = true
projectId = project.mod_id
optional "classescore"
}
thunderstore {
enabled = true
namespace = project.mod_author
websiteUrl = project.mod_url
description = project.mod_description
categories = ["plugins", "mods", "release"]
hasNsfwContent = false
}
}