-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
112 lines (89 loc) · 2.59 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
101
102
103
104
105
106
107
108
109
110
111
112
plugins {
id 'eclipse'
id 'idea'
id 'java-library'
id 'net.neoforged.moddev' version '1.0.0'
}
group = 'com.lovetropics.donations'
base {
archivesName = 'LTDonations'
}
ext.buildnumber = 0
project.buildnumber = System.getenv('BUILD_NUMBER') ?: 'custom'
if (System.getenv('GHA_RELEASE_WORKFLOW')) {
version = "${mod_version}"
} else if (System.getenv('GITHUB_RUN_NUMBER')) {
project.buildnumber = System.getenv('GITHUB_RUN_NUMBER')
version = "${mod_version}-${release_type}+${buildnumber}-gha"
} else {
project.buildnumber = System.getenv('BUILD_NUMBER') ?: 'custom'
version = "${mod_version}-${release_type}+${buildnumber}"
}
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
neoForge {
version = project.neo_version
parchment {
minecraftVersion = minecraft_version
mappingsVersion = parchment_version
}
addModdingDependenciesTo sourceSets.test
runs {
client {
client()
programArguments.addAll '--username', 'Dev###'
}
server {
server()
programArgument '--nogui'
}
data {
data()
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
}
configureEach {
logLevel = org.slf4j.event.Level.INFO
}
}
mods {
"${project.mod_id}" {
sourceSet sourceSets.main
sourceSet sourceSets.test
}
}
}
sourceSets.main.resources {
srcDir 'src/generated/resources'
}
repositories {
maven { url = "https://maven.ithundxr.dev/snapshots/" }
maven { url = "https://maven.tterrag.com/" }
mavenLocal()
}
dependencies {
jarJar(implementation("com.tterrag.registrate:Registrate:$registrate_version")) {
version {
strictly "[MC1.21-${registrate_version},MC1.22)"
prefer "MC1.21-${registrate_version}"
}
}
jarJar(implementation("com.lovetropics.lib:LTLib:$ltlib_version"))
jarJar(implementation("eu.pb4:placeholder-api-lt:$placeholder_api_version"))
}
tasks.withType(ProcessResources).configureEach {
var replaceProperties = [
mod_version: mod_version,
]
inputs.properties replaceProperties
filesMatching(['META-INF/neoforge.mods.toml']) {
expand replaceProperties
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
idea {
module {
downloadSources = true
downloadJavadoc = true
}
}