forked from tr7zw/ProcessedModTemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
168 lines (148 loc) · 5.12 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
156
157
158
159
160
161
162
163
164
165
166
167
168
plugins {
id 'maven-publish'
id "dev.architectury.loom" version "1.9-SNAPSHOT" apply false
// https://github.com/ReplayMod/preprocessor
// https://github.com/Fallen-Breath/preprocessor
id 'com.replaymod.preprocess' version '20c7ec554a'
id "com.diffplug.spotless" version "7.0.0.BETA4"
}
tasks.named('assemble').get().dependsOn 'spotlessApply'
spotless {
java {
target '**/*.java'
eclipse().configFile("${project.rootDir}/formatter.xml")
toggleOffOn()
}
format 'misc', {
target '**/*.gitattributes', '**/*.gitignore', '**/*.toml'
trimTrailingWhitespace()
endWithNewline()
}
yaml {
target '**/*.yaml'
jackson()
}
json {
target '**/*.json'
gson()
}
flexmark {
target '**/*.md'
flexmark()
}
}
repositories {
mavenCentral()
maven {
url 'https://maven.fabricmc.net/'
}
maven {
url 'https://maven.architectury.dev/'
}
maven {
url 'https://jitpack.io'
}
}
preprocess {
def mc11605_forge = createNode('1.16.5-forge' , 1_16_05, 'official')
def mc11605_fabric = createNode('1.16.5-fabric', 1_16_05, 'official')
def mc11701_forge = createNode('1.17.1-forge' , 1_17_01, 'official')
def mc11701_fabric = createNode('1.17.1-fabric', 1_17_01, 'official')
def mc11802_forge = createNode('1.18.2-forge' , 1_18_02, 'official')
def mc11802_fabric = createNode('1.18.2-fabric', 1_18_02, 'official')
def mc11902_forge = createNode('1.19.2-forge' , 1_19_02, 'official')
def mc11902_fabric = createNode('1.19.2-fabric', 1_19_02, 'official')
def mc11903_forge = createNode('1.19.3-forge' , 1_19_03, 'official')
def mc11903_fabric = createNode('1.19.3-fabric', 1_19_03, 'official')
def mc11904_forge = createNode('1.19.4-forge' , 1_19_04, 'official')
def mc11904_fabric = createNode('1.19.4-fabric', 1_19_04, 'official')
def mc12001_forge = createNode('1.20.1-forge' , 1_20_01, 'official')
def mc12001_fabric = createNode('1.20.1-fabric', 1_20_01, 'official')
def mc12002_forge = createNode('1.20.2-forge' , 1_20_02, 'official')
def mc12002_neoforge = createNode('1.20.2-neoforge' , 1_20_02, 'official')
def mc12002_fabric = createNode('1.20.2-fabric', 1_20_02, 'official')
def mc12004_fabric = createNode('1.20.4-fabric', 1_20_04, 'official')
def mc12004_forge = createNode('1.20.4-forge' , 1_20_04, 'official')
def mc12004_neoforge = createNode('1.20.4-neoforge' , 1_20_04, 'official')
def mc12006_fabric = createNode('1.20.6-fabric', 1_20_06, 'official')
def mc12006_forge = createNode('1.20.6-forge', 1_20_06, 'official')
def mc12006_neoforge = createNode('1.20.6-neoforge' , 1_20_06, 'official')
def mc12100_fabric = createNode('1.21-fabric', 1_21_00, 'official')
def mc12100_forge = createNode('1.21-forge', 1_21_00, 'official')
def mc12100_neoforge = createNode('1.21-neoforge' , 1_21_00, 'official')
def mc12103_fabric = createNode('1.21.3-fabric', 1_21_03, 'official')
def mc12103_forge = createNode('1.21.3-forge' , 1_21_03, 'official')
def mc12103_neoforge = createNode('1.21.3-neoforge' , 1_21_03, 'official')
def mc12104_fabric = createNode('1.21.4-fabric', 1_21_04, 'official')
def mc12104_forge = createNode('1.21.4-forge' , 1_21_04, 'official')
def mc12104_neoforge = createNode('1.21.4-neoforge' , 1_21_04, 'official')
// 1.16.5
mc11605_fabric.link(mc11605_forge, null)
mc11701_fabric.link(mc11605_fabric, null)
// 1.17.1
mc11701_fabric.link(mc11701_forge, null)
mc11802_fabric.link(mc11701_fabric, null)
// 1.18.2
mc11802_fabric.link(mc11802_forge, null)
mc11902_fabric.link(mc11802_fabric, null)
// 1.19.2
mc11902_fabric.link(mc11902_forge, null)
mc11903_fabric.link(mc11902_fabric, null)
// 1.19.3
mc11903_fabric.link(mc11903_forge, null)
mc11904_fabric.link(mc11903_fabric, null)
// 1.19.4
mc11904_fabric.link(mc11904_forge, null)
mc12001_fabric.link(mc11904_fabric, null)
// 1.20.1
mc12002_fabric.link(mc12001_fabric, null)
mc12001_fabric.link(mc12001_forge, null)
// 1.20.2
mc12004_fabric.link(mc12002_fabric, null)
mc12002_fabric.link(mc12002_forge, null)
mc12002_fabric.link(mc12002_neoforge, null)
// 1.20.4
mc12006_fabric.link(mc12004_fabric, null)
mc12004_fabric.link(mc12004_forge, null)
mc12004_fabric.link(mc12004_neoforge, null)
// 1.20.6
mc12100_fabric.link(mc12006_fabric, null)
mc12006_fabric.link(mc12006_forge, null)
mc12006_fabric.link(mc12006_neoforge, null)
// 1.21
mc12103_fabric.link(mc12100_fabric, null)
mc12100_fabric.link(mc12100_forge, null)
mc12100_fabric.link(mc12100_neoforge, null)
// 1.21.3
mc12104_fabric.link(mc12103_fabric, null)
mc12103_fabric.link(mc12103_forge, null)
mc12103_fabric.link(mc12103_neoforge, null)
// 1.21.4
// fabric 1.21.4 is technically here
mc12104_fabric.link(mc12104_forge, null)
mc12104_fabric.link(mc12104_neoforge, null)
}
tasks.register('buildAndGather') {
subprojects {
dependsOn project.tasks.named('build').get()
}
doFirst {
println 'Gathering builds'
def buildLibs = {
p -> p.buildDir.toPath().resolve('libs')
}
delete fileTree(buildLibs(rootProject)) {
include '*'
}
subprojects {
copy {
from(buildLibs(project)) {
include '*.jar'
exclude '*-dev.jar', '*-sources.jar'
}
into buildLibs(rootProject)
duplicatesStrategy DuplicatesStrategy.INCLUDE
}
}
}
}