-
Notifications
You must be signed in to change notification settings - Fork 24
/
build.gradle
81 lines (66 loc) · 2.25 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
plugins {
alias libs.plugins.architectury.loom apply false
// alias libs.plugins.loom.quiltflower apply false
alias libs.plugins.minotaur apply false
alias libs.plugins.architectury.plugin
alias libs.plugins.cursegradle
id 'maven-publish'
}
architectury {
minecraft = libs.versions.minecraft.get()
}
subprojects {
apply plugin: "dev.architectury.loom"
apply plugin: 'maven-publish'
apply plugin: 'com.matthewprenger.cursegradle'
// apply plugin: "com.modrinth.minotaur"
// apply plugin: "io.github.juuxel.loom-quiltflower"
dependencies {
minecraft libs.minecraft
// The following line declares the mojmap mappings, you may use other mappings as well
mappings "net.fabricmc:yarn:${libs.versions.yarn.mappings.get()}:v2"
}
}
allprojects {
apply plugin: "java"
apply plugin: "architectury-plugin"
ext.mod_version = libs.versions.mod.version.get()
ext.minecraft_version = libs.versions.minecraft.get()
ext.total_version = "$mod_version+$minecraft_version"
def cf = libs.versions.overrides.curseforge.get()
def mr = libs.versions.overrides.modrinth.get()
ext.curseforge_mc_version = cf == 'mc' ? minecraft_version : cf
ext.modrinth_mc_version = mr == 'mc' ? minecraft_version : mr
ext.release_type = libs.versions.release.type.get()
archivesBaseName = rootProject.archives_base_name
version = ext.total_version
group = rootProject.maven_group
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
withSourcesJar()
}
}
task publishAll {
group = "upload"
dependsOn("fabric:publishFabric")
dependsOn("forge:publishForge")
}
task addTestFabricMod(type: Copy) {
dependsOn project(":TestFabricMod").tasks.build
from "TestFabricMod/build/libs/nec_testmod-1.0.0.jar"
into "fabric/run/mods"
}
task addTestForgeMod(type: Copy) {
dependsOn project(":TestForgeMod").tasks.build
// Copy dev jar because there is no support for automatic remapping
from "TestForgeMod/build/libs/nec_testmod-1.0.0-dev-shadow.jar"
into "forge/run/mods"
}
task addTestMods {
dependsOn addTestFabricMod, addTestForgeMod
}