-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
97 lines (78 loc) · 2.53 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
plugins {
id "java"
id "com.github.johnrengelman.shadow" version "8.1.1" apply false
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.7-SNAPSHOT" apply false
}
architectury {
minecraft = rootProject.minecraft_version
}
subprojects {
apply plugin: "com.github.johnrengelman.shadow"
apply plugin: "dev.architectury.loom"
configurations {
common
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
developmentFabric.extendsFrom common
}
processResources {
def resourceTargets = [
"fabric.mod.json",
"META-INF/neoforge.mods.toml",
]
def replaceProperties = [
version : mod_version,
fabric_minecraft_version_range : fabric_minecraft_version_range,
neo_version_range : neo_minecraft_version_range,
fabric_loader_version : fabric_loader_version,
modmenu_version : modmenu_version,
]
inputs.properties replaceProperties
filesMatching(resourceTargets) {
expand replaceProperties
}
}
loom {
silentMojangMappingsLicense()
}
dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
mappings loom.layered {
it.mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
it.mappings "dev.architectury:yarn-mappings-patch-neoforge:${project.neoforge_yarn_mappings_patch}"
}
}
shadowJar {
exclude "architectury.common.json"
configurations = [project.configurations.shadowCommon]
archiveClassifier.set("dev-shadow")
}
jar {
archiveClassifier.set("dev")
}
}
allprojects {
apply plugin: "java"
apply plugin: "architectury-plugin"
apply plugin: "maven-publish"
base.archivesName = rootProject.mod_id
version = rootProject.mod_version
group = rootProject.maven_group
repositories {
// Architectury
maven { url "https://maven.shedaniel.me/" }
// ModMenu
maven { url "https://maven.terraformersmc.com/" }
// NeoForge
maven { url "https://maven.neoforged.net/releases/" }
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.release = 21
}
java {
withSourcesJar()
}
}