generated from jaredlll08/MultiLoader-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
63 lines (46 loc) · 1.74 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
plugins {
id("dev.nanite.mlp") version("0.3.0")
id("java-library")
id("maven-publish")
id("me.modmuss50.mod-publish-plugin") version "0.3.0"
id 'org.jetbrains.gradle.plugin.idea-ext' version '1.0'
}
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
multiLoader.root() {
minecraftVersion.set(project.property("minecraft_version"))
modID.set(project.property("mod_id"))
splitSources.set(true)
convertAccessWidener.set(true)
accessWidenerFile.set(project(":common").file("src/main/resources/${mod_id}.accesswidener"))
group.set(project.property("maven_group"))
}
publishMods {
dryRun = providers.environmentVariable("CURSE_TOKEN").getOrNull() == null
changelog = file("./CHANGELOG.md").text
version = "${mod_version}"
type = STABLE
def fabricOptions = publishOptions {
file = project.provider { project(":fabric").tasks.remapJar }.flatMap { it.archiveFile }
displayName = "${project.name} Fabric ${mod_version}+mc${minecraft_version}"
modLoaders.add("fabric")
}
def neoOptions = publishOptions {
file = project.provider { project(":neo").tasks.jar }.flatMap { it.archiveFile }
displayName = "${project.name} Neo ${mod_version}+mc${minecraft_version}"
modLoaders.add("neoforge")
}
def curseForgeOptions = curseforgeOptions {
accessToken = providers.environmentVariable("CURSE_TOKEN")
projectId = "${curse_id}"
minecraftVersions.add("${minecraft_version}")
}
curseforge("curseforgeFabric") {
from(curseForgeOptions, fabricOptions)
requires {
slug = "fabric-api"
}
}
curseforge("curseforgeNeoForge") {
from(curseForgeOptions, neoOptions)
}
}