forked from tterrag1098/DummyPlayers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
99 lines (82 loc) · 2.25 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
plugins {
id 'eclipse'
id 'idea'
id 'java-library'
id 'maven-publish'
id 'net.neoforged.moddev' version '1.0.0'
id 'com.matthewprenger.cursegradle' version '1.4.0'
}
group = 'com.tterrag.dummyplayers'
base {
archivesName = 'DummyPlayers'
}
ext.buildnumber = 0
project.buildnumber = System.getenv('BUILD_NUMBER') ?: 'custom'
if (System.getenv('GITHUB_RUN_NUMBER')) {
project.buildnumber = System.getenv('GITHUB_RUN_NUMBER')
version = "${mod_version}-${release_type}+${buildnumber}-gha"
} else {
version = "${mod_version}-${release_type}+${buildnumber}"
}
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
neoForge {
version = project.neo_version
parchment {
minecraftVersion = minecraft_version
mappingsVersion = parchment_version
}
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.DEBUG
}
}
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:MC1.21-${registrate_version}")) {
version {
strictly "[MC1.21-${registrate_version},MC1.22)"
prefer "MC1.21-${registrate_version}"
}
}
}
tasks.withType(ProcessResources).configureEach {
var replaceProperties = [
mod_version: mod_version,
]
inputs.properties replaceProperties
filesMatching(['META-INF/neoforge.mods.toml']) {
expand replaceProperties
}
}
idea {
module {
downloadSources = true
downloadJavadoc = true
}
}