forked from Faboslav/friends-and-foes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
70 lines (58 loc) · 1.7 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
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id 'dev.architectury.loom' version '1.7-SNAPSHOT' apply false
}
architectury {
minecraft = minecraft_version
}
subprojects {
apply plugin: "dev.architectury.loom"
dependencies {
minecraft "com.mojang:minecraft:${minecraft_version}"
mappings loom.layered {
it.mappings "net.fabricmc:yarn:${yarn_mappings}:v2"
it.mappings "dev.architectury:yarn-mappings-patch-neoforge:${yarn_mappings_patch}"
}
}
}
allprojects {
apply plugin: "java"
apply plugin: "architectury-plugin"
group = maven_group
version = mod_version
archivesBaseName = "${mod_id}-mc${minecraft_version}"
processResources {
def expandProps = [
"modJavaVersion" : mod_java_version,
'modId' : mod_id,
'modName' : mod_name,
'modDescription' : mod_description,
'modVersion' : mod_version,
'modAuthor' : mod_author,
"minecraftVersion" : minecraft_version,
"minMinecraftVersion": min_minecraft_version,
"fabricLoaderVersion": fabric_loader_version,
"fabricApiVersion" : fabric_api_version,
"neoForgeVersion" : neoforge_version
]
filesMatching(['pack.mcmeta', 'fabric.mod.json', 'META-INF/mods.toml', 'META-INF/neoforge.mods.toml', '*.mixins.json']) {
expand expandProps
}
inputs.properties(expandProps)
}
repositories {
maven {
name = "Jitpack"
url 'https://jitpack.io/'
}
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = 'UTF-8'
it.options.getRelease().set(mod_java_version as Integer)
}
java {
withSourcesJar()
sourceCompatibility = JavaVersion.toVersion(mod_java_version)
targetCompatibility = JavaVersion.toVersion(mod_java_version)
}
}