-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
113 lines (87 loc) · 2.74 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
plugins {
id 'java-library'
id 'com.gradleup.shadow' version '8.3.3'
id 'org.spongepowered.gradle.vanilla' version '0.2.1-SNAPSHOT'
id 'com.diffplug.spotless' version '6.25.0'
}
group 'net.smoofyuniverse'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories {
mavenCentral()
maven {
name = 'sponge'
url = 'https://repo.spongepowered.org/repository/maven-public/'
}
}
configurations {
spongevanilla
spongeforge
spongeneo
}
minecraft {
version '1.21.1'
accessWideners(file("src/main/resources/mirage.accesswidener"))
}
dependencies {
api 'org.spongepowered:spongeapi:12.0.0'
implementation 'org.spongepowered:sponge:1.21.1-12.0.0-SNAPSHOT:dev'
implementation 'org.spongepowered:mixin:0.8.7'
implementation 'org.ow2.asm:asm-util:9.7'
implementation 'net.smoofyuniverse:oreupdater:1.4.0'
implementation 'net.smoofyuniverse:worldmap:1.3.0'
implementation 'net.smoofyuniverse:bingo:1.1.0'
spongevanilla('org.spongepowered:spongevanilla:1.21.1-12.0.0-RC1856:universal') { transitive = false }
spongeforge('org.spongepowered:spongeforge:1.21.1-52.0.3-12.0.0-RC1856:universal') { transitive = false }
spongeneo('org.spongepowered:spongeneo:1.21.1-21.1.35-12.0.0-RC1856:universal') { transitive = false }
}
jar {
archiveClassifier = 'base'
}
shadowJar {
archiveClassifier = ''
dependencies {
include dependency('net.smoofyuniverse:oreapi')
include dependency('net.smoofyuniverse:oreupdater')
include dependency('net.smoofyuniverse:worldmap')
include dependency('net.smoofyuniverse:bingo')
}
relocate 'net.smoofyuniverse.ore', 'net.smoofyuniverse.mirage.ore'
relocate 'net.smoofyuniverse.map', 'net.smoofyuniverse.mirage.map'
relocate 'net.smoofyuniverse.bingo', 'net.smoofyuniverse.mirage.bingo'
manifest {
attributes('MixinConfigs': 'mixins.mirage.json', 'Access-Widener': 'mirage.accesswidener')
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = "utf-8"
}
tasks.register('setupVanillaServer', Copy) {
into 'run/vanilla'
from configurations.spongevanilla
rename('spongevanilla-(.*).jar', 'spongevanilla.jar')
into('mods') {
from shadowJar
}
}
tasks.register('setupForgeServer', Copy) {
into 'run/forge/mods'
from configurations.spongeforge
rename('spongeforge-(.*).jar', 'spongeforge.jar')
from shadowJar
}
tasks.register('setupNeoServer', Copy) {
into 'run/neoforge/mods'
from configurations.spongeneo
rename('spongeneo-(.*).jar', 'spongeneo.jar')
from shadowJar
}
spotless {
ratchetFrom 'origin/master'
java {
licenseHeaderFile(rootProject.file('HEADER'))
}
}