-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbuild.gradle
More file actions
52 lines (46 loc) · 1.65 KB
/
build.gradle
File metadata and controls
52 lines (46 loc) · 1.65 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
plugins {
alias(libs.plugins.preprocessor)
alias(libs.plugins.grgit)
}
preprocess {
strictExtraMappings = false
def mc1165 = createNode("1.16.5", 1_16_05, "mojang")
def mc1171 = createNode("1.17.1", 1_17_01, "mojang")
def mc1182 = createNode("1.18.2", 1_18_02, "mojang")
def mc1192 = createNode("1.19.2", 1_19_02, "mojang")
def mc1193 = createNode("1.19.3", 1_19_03, "mojang")
def mc1194 = createNode("1.19.4", 1_19_04, "mojang")
def mc1206 = createNode("1.20.6", 1_20_06, "mojang")
def mc1211 = createNode("1.21.1", 1_21_01, "mojang")
def mc1215 = createNode("1.21.5", 1_21_05, "mojang")
def mc1218 = createNode("1.21.8", 1_21_08, "mojang")
def mc12110 = createNode("1.21.10", 1_21_10, "mojang")
def mc12111 = createNode("1.21.11", 1_21_11, "mojang")
mc1165.link(mc1171, null)
mc1171.link(mc1182, null)
mc1182.link(mc1192, null)
mc1192.link(mc1193, null)
mc1193.link(mc1194, null)
mc1194.link(mc1206, null)
mc1206.link(mc1211, null)
mc1211.link(mc1215, null)
mc1215.link(mc1218, null)
mc1218.link(mc12110, null)
mc12110.link(mc12111, null)
}
def ENV = System.getenv()
String realVersion = "${project.mod_version}+build."
realVersion += ENV.GITHUB_RUN_NUMBER ? ENV.GITHUB_RUN_NUMBER : new Date().format("yyyyMMdd.HHmmss")
if (grgit != null) {
realVersion += grgit.status().isClean() ? "+${grgit.head().abbreviatedId}" : "+uncommited"
} else {
realVersion += "+nogit"
}
version = realVersion
tasks.register("cleanPreprocessSources") {
doFirst {
subprojects {
layout.buildDirectory.dir("preprocessed").getOrNull().asFile.deleteDir()
}
}
}