-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
76 lines (61 loc) · 2 KB
/
build.gradle.kts
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
plugins {
id("java")
id("fabric-loom") version ("1.8.9") apply (false)
}
val MINECRAFT_VERSION by extra { "1.21.3" }
val NEOFORGE_VERSION by extra { "21.3.58" }
val FABRIC_LOADER_VERSION by extra { "0.16.9" }
val FABRIC_API_VERSION by extra { "0.112.1+1.21.3" }
// This value can be set to null to disable Parchment.
val PARCHMENT_VERSION by extra { null }
// https://semver.org/
val MAVEN_GROUP by extra { "net.anvian.sodiumextrainformation" }
val ARCHIVE_NAME by extra { "SodiumExtraInformation" }
val MOD_VERSION by extra { "2.4" }
val SODIUM_VERSION by extra { "mc1.21.3-0.6.5" }
val SODIUM_EXTRA_VERSION by extra { "mc1.21.3-0.6.0" }
val MODMENU_VERSION by extra { "12.0.0-beta.1" }
val COMPATIBLE_VERSIONS by extra { "[1.21.2, 1.22)" }
allprojects {
apply(plugin = "java")
apply(plugin = "maven-publish")
group = MAVEN_GROUP
version = MOD_VERSION
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
subprojects {
apply(plugin = "maven-publish")
repositories {
maven("https://maven.parchmentmc.org/")
maven("https://api.modrinth.com/maven")
maven("https://libraries.minecraft.net")
}
base {
archivesName = "$ARCHIVE_NAME-${project.name}"
}
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
tasks.processResources {
filesMatching("META-INF/neoforge.mods.toml") {
expand(mapOf("version" to { MOD_VERSION }))
}
}
version = MOD_VERSION
group = MAVEN_GROUP
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.release.set(21)
}
tasks.withType<GenerateModuleMetadata>().configureEach {
enabled = false
}
tasks.register("printEnv") {
doLast {
val envFile = File(System.getenv("GITHUB_ENV"))
envFile.appendText("MOD_VERSION=$MOD_VERSION\n")
envFile.appendText("RELEASE_NAME=$ARCHIVE_NAME-$MOD_VERSION\n")
envFile.appendText("GAME_VERSIONS=$COMPATIBLE_VERSIONS\n")
}
}
}