-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
70 lines (58 loc) · 2.26 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
plugins {
id 'com.diffplug.spotless' version '6.25.0'
id 'com.dorongold.task-tree' version '4.0.0'
id 'fabric-loom' version "1.8.0-alpha.17" apply false
id 'net.neoforged.moddev' version '2.0.26-beta' apply false
id 'me.modmuss50.mod-publish-plugin' version '0.7.2' apply false
id 'net.minecraftforge.gradle' version '6.+' apply false
id 'org.parchmentmc.librarian.forgegradle' version '1.2.0' apply false
}
repositories {
mavenCentral()
}
spotless {
java {
target "**/src/main/**/de/wonejo/wuidebook/**/*.java"
removeUnusedImports ()
formatAnnotations ()
ignoreErrorForPath("**/src/main/**/de/wonejo/wuidebook/**/*.jav")
}
}
subprojects {
tasks.withType(AbstractArchiveTask).configureEach {
setPreserveFileTimestamps(false)
setReproducibleFileOrder(true)
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
options.release = 21
}
tasks.withType(Javadoc).configureEach {
def docletOptions = options as StandardJavadocDocletOptions
docletOptions.addStringOption("Xdoclint:none", "-quiet")
}
tasks.withType(Jar).configureEach {
manifest {
var jarAttributes =
["Specification-Title": modName,
"Specification-Vendor": modAuthor,
"Specification-Version": modVersion,
"Implementation-Title": name,
"Implementation-Version": archiveVersion,
"Implementation-Vendor": modAuthor]
attributes(jarAttributes)
}
}
tasks.withType(ProcessResources).configureEach {
var replaceProperties = [
modId: modId, modName: modName, modVersion: modVersion, modAuthor: modAuthor, modDescription: modDescription, modLicense: modLicense,
forgeVersion: forgeVersion, forgeRange: forgeRange,
neoVersion: neoVersion, neoRange: neoRange, neoLoader: neoLoader,
fabricApi: fabricApi, fabricLoader: fabricLoader
]
inputs.properties replaceProperties
filesMatching(["META-INF/neoforge.mods.toml", "META-INF/mods.toml", "fabric.mod.json", "pack.mcmeta"]) {
expand replaceProperties
}
}
}