forked from PaintNinja/japanese-emoji-commands
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
80 lines (63 loc) · 2.78 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
plugins {
id 'eclipse'
id 'net.minecraftforge.gradle' version '5.1.+'
id 'io.github.groovymc.modsdotgroovy' version '1.1.2'
}
version = "$mod_version"
group = 'ga.ozli.minecraftmods.japaneseemojicommands'
archivesBaseName = 'japaneseemojicommands'
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
minecraft {
mappings channel: 'official', version: minecraft_version
runs {
// Shared between all run configs
configureEach {
workingDirectory project.file('run')
property 'forge.logging.console.level', 'debug'
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
property 'forge.enabledGameTestNamespaces', 'japaneseemojicommands'
mods {
japaneseemojicommands {
source sourceSets.main
}
}
}
client { args '--username', 'Dev##' }
server { args '--nogui', 'true' }
// This run config launches GameTestServer and runs all registered gametests, then exits.
// By default, the server will crash when no gametests are provided.
// The gametest system is also enabled by default for other run configs under the /test command.
gameTestServer { args '--nogui', 'true' }
data {
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
args '--mod', 'japaneseemojicommands', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
}
}
}
// Include resources generated by data generators.
sourceSets.main.resources { srcDir 'src/generated/resources' }
dependencies {
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
}
tasks.named('jar', Jar) {
manifest.attributes([
"Specification-Title" : 'Japanese Emoji Commands',
"Specification-Vendor" : 'Paint_Ninja',
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : 'Japanese Emoji Commands',
"Implementation-Version" : mod_version,
"Implementation-Vendor" : 'Paint_Ninja',
"Implementation-Timestamp" : new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
includeEmptyDirs = false
reproducibleFileOrder = true
finalizedBy 'reobfJar'
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
modsDotGroovy {
dslVersion = '1.2.1'
platform 'forge'
}