-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
61 lines (49 loc) · 1.75 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
plugins {
id "architectury-plugin" version "3.4.+"
id "dev.architectury.loom" version "1.7.+" apply false
}
tasks.register("printEnv") {
doLast {
def envFile = new File(System.getenv("GITHUB_ENV"))
envFile.append("MOD_VERSION=$mod_version\n")
envFile.append("RELEASE_NAME=$archives_base_name-$mod_version\n")
envFile.append("GAME_VERSIONS=$minecraft_version\n")
}
}
architectury {
minecraft = minecraft_version
}
subprojects {
apply plugin: "dev.architectury.loom"
loom {
silentMojangMappingsLicense()
}
repositories {
maven { url = "https://maven.parchmentmc.org" } // Parchment mappings
// mavens used on both forge and fabric
maven { url = "https://maven.blamejared.com/" } // JEI
maven { url = "https://maven.tterrag.com/" } // Flywheel on both, Create and Registrate on forge
maven { url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/" } // Fuzs Mod Resources
}
dependencies {
minecraft "com.mojang:minecraft:$minecraft_version"
mappings loom.officialMojangMappings()
}
}
allprojects {
apply plugin: "java"
apply plugin: "architectury-plugin"
apply plugin: "maven-publish"
base.archivesName = archives_base_name
group = maven_group
// Formats the mod version to include the loader, Minecraft version, and build number (if present)
// example: 1.0.0+fabric-1.18.2-build.100
String buildNumber = System.getenv("GITHUB_RUN_NUMBER")
version = "$mod_version+$project.name-$minecraft_version" + (buildNumber != null ? "-build.$buildNumber" : "")
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
}
java {
withSourcesJar()
}
}