-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
113 lines (95 loc) · 2.72 KB
/
Copy pathbuild.gradle
File metadata and controls
113 lines (95 loc) · 2.72 KB
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
101
102
103
104
105
106
107
108
109
110
111
112
113
import me.modmuss50.mpp.ReleaseType
plugins {
id 'java-library'
id 'net.neoforged.moddev' version '2.0.120'
id "me.modmuss50.mod-publish-plugin" version "0.8.4"
}
version = project.mod_version
group = project.mod_group_id
repositories {
mavenLocal()
maven {
url = "https://maven.neoforged.net/releases/"
}
maven {
url = "https://www.cursemaven.com"
}
}
base {
archivesName = project.mod_id
}
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
sourceSets {
main {
resources {
srcDir 'src/generated/resources'
}
}
}
neoForge {
version = project.neoforge_version
mods {
"${mod_id}" {
sourceSet(sourceSets.main)
}
}
runs {
configureEach {
systemProperty 'forge.logging.markers', 'REGISTRIES'
systemProperty 'forge.logging.console.level', 'debug'
}
client {
client()
}
server {
server()
}
data {
data()
programArguments.addAll '--mod', project.mod_id, '--all',
'--output', file('src/generated/resources/').getAbsolutePath(),
'--existing', file('src/main/resources').getAbsolutePath(),
"--existing-mod", "dynamictrees",
"--existing-mod", "quark"
}
}
}
dependencies {
implementation "curse.maven:quark-243121:7625365"
implementation "curse.maven:zeta-968868:7625372"
implementation "curse.maven:dynamictrees-252818:7513464"
implementation "curse.maven:dynamictreesplus-478155:7513822"
}
def changelogFile = file("build/changelog.txt")
publishMods {
file = jar.archiveFile
displayName = "${mod_name.replace(' ','')}-NeoForge-${minecraft_version} ${project.version}"
if (changelogFile.exists()) {
changelog.set(changelogFile.getText())
}
type = ReleaseType.of(versionType.toUpperCase())
modLoaders.add("neoforge")
curseforge {
projectId = "386753"
projectSlug = "dynamic-trees-quark" // Required for discord webhook
accessToken = curseApiKey ?: System.getenv("CURSEFORGE_API_KEY")
minecraftVersions.add("1.21.1")
requires("dynamictrees")
optional("dynamictreesplus")
requires("quark")
}
modrinth {
projectId = "9paueCZy"
accessToken = modrinthToken ?: System.getenv("MODRINTH_TOKEN")
minecraftVersions.add("1.21.1")
requires("vdjF5PL5") //dt
optional("qaO9Dqpu") //dt+
requires("qnQsVE2z") //quark
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
processResources {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}