forked from natanfudge/Not-Enough-Crashes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
100 lines (83 loc) · 2.27 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
98
99
100
plugins {
id "com.github.johnrengelman.shadow" version "5.0.0"
id 'org.spongepowered.plugin' version '0.9.0'
}
configurations {
shadowCommon
}
architectury {
platformSetupLoomIde()
forge()
}
loom {
mixinConfigs = ["notenoughcrashes.mixins.json", "notenoughcrashes.forge.mixins.json"]
useFabricMixin = true
}
dependencies {
// minecraft("com.mojang:minecraft:${rootProject.minecraft_version}")
mappings("net.fabricmc:yarn:${rootProject.yarn_mappings}:v2")
forge("net.minecraftforge:forge:${rootProject.minecraft_version}-${rootProject.forge_version}")
// modRuntime(files("testmods/modid-1.0.jar"))
// Remove the next line if you don't want to depend on the API
// modCompile("me.shedaniel:architectury:${rootProject.architectury_version}:forge")
compileOnly(project(path: ":common")) {
transitive = false
}
developmentForge(project(path: ":common")) {
transitive = false
}
shadowCommon(project(path: ":common", configuration: "transformProductionForge")) {
transitive = false
}
}
processResources {
inputs.property "version", project.version
filesMatching("META-INF/mods.toml") {
expand "version": project.version
}
}
shadowJar {
exclude "fabric.mod.json"
configurations = [project.configurations.shadowCommon]
classifier "dev-shadow"
}
remapJar {
input.set shadowJar.archiveFile
dependsOn shadowJar
classifier "forge"
}
jar {
manifest {
attributes([
"MixinConfigs" : "notenoughcrashes.mixins.json"
])
}
}
jar {
classifier "dev"
}
java {
withSourcesJar()
}
sourcesJar {
def commonSources = project(":common").remapSourcesJar
dependsOn commonSources
from zipTree(commonSources.output)
}
curseforge {
apiKey = project.hasProperty("curseforge_api_key") ? project.curseforge_api_key : ""
project {
id = curseforge_id
releaseType = 'release'
addGameVersion "Forge"
addGameVersion curseforge_mc_version
changelogType = "markdown"
changelog = rootProject.file("changelog.md")
mainArtifact(remapJar) {
displayName = "$mod_name $total_version Forge"
}
}
options {
forgeGradleIntegration = false
}
}