-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
86 lines (70 loc) · 2.04 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
plugins {
id 'java-library'
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.neoforged.moddev' version '1.0.14'
}
ext.buildnumber = 0
if (System.getenv('GITHUB_RUN_NUMBER')) {
project.buildnumber = System.getenv('GITHUB_RUN_NUMBER')
version = "${mod_version}+${buildnumber}-gha"
} else {
version = "${mod_version}"
}
group = 'com.lovetropics.gamemodebuild'
base {
archivesName = 'GamemodeBuild'
}
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
neoForge {
version = project.neo_version
parchment {
mappingsVersion = project.parchment_mappings_version
minecraftVersion = project.parchment_minecraft_version
}
mods {
gamemodebuild {
sourceSet sourceSets.main
}
}
runs {
client {
client()
}
server {
server()
}
data {
data()
systemProperty 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
systemProperty 'forge.logging.console.level', 'debug'
programArguments.addAll '--mod', 'gamemodebuild', '--all', '--output', file('src/generated/resources/').absolutePath
}
}
}
tasks.named('jar', Jar).configure {
manifest {
attributes([
"Specification-Title": "gamemodebuild",
"Specification-Vendor": "lovetropics",
"Specification-Version": "1",
"Implementation-Title": project.name,
"Implementation-Version": archiveVersion,
"Implementation-Vendor" :"lovetropics",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
])
}
}
tasks.named('processResources', ProcessResources).configure {
var replaceProperties = [
mod_version: mod_version,
]
inputs.properties replaceProperties
filesMatching(['META-INF/neoforge.mods.toml', 'pack.mcmeta']) {
expand replaceProperties + [project: project]
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}