-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
175 lines (151 loc) · 5.45 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
plugins {
id 'java-library'
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.neoforged.gradle.userdev' version '7.0.173'
}
version = minecraft_version + "-" + mod_version
group = mod_group_id
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
minecraft.accessTransformers.file rootProject.file('src/main/resources/META-INF/accesstransformer.cfg')
base {
archivesName = mod_id
}
repositories {
maven {
url "https://cursemaven.com"
content { includeGroup "curse.maven" }
}
maven { url "https://maven.neoforged.net/releases" }
maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
mavenCentral()
jcenter()
flatDir {
dir 'libs'
}
}
configurations {
runtimeClasspath.extendsFrom localRuntime
}
dependencies {
implementation "net.neoforged:neoforge:${neo_version}"
// compileOnly "org.spongepowered:mixin:0.8.5"
// Imports
implementation "curse.maven:accessories-${accessories_version}"
implementation "curse.maven:architectury-api-${architectury_api_version}"
implementation "curse.maven:cloth-config-${cloth_config_version}"
implementation "curse.maven:ctm-${ctm_version}"
implementation "curse.maven:fusion-connected-textures-${fusion_version}"
implementation "curse.maven:geckolib-${geckolib_version}"
// implementation "curse.maven:pehkui-${pehkui_version}"
implementation "curse.maven:owo-lib-${owo_version}"
implementation "curse.maven:roughly-enough-items-${rei_version}"
implementation "curse.maven:selene-${moonlight_version}"
implementation "curse.maven:spark-${spark_version}"
implementation "curse.maven:supplementaries-${supplementaries_version}"
implementation "curse.maven:the-twilight-forest-227639:5699076"
implementation "curse.maven:gardens-of-the-dead-683174:5640395"
// implementation "com.github.Virtuoel:Pehkui:${pehkui_version}"
// implementation "software.bernie.geckolib:geckolib-neoforge-${minecraft_version}:${geckolib_version}"
// implementation "curse.maven:itemzoom-261725:5536959"
// implementation "curse.maven:jei-${jei_version}"
// implementation "curse.maven:structure-gel-api-${structure_gel_version}"
}
runs {
configureEach {
systemProperty 'forge.logging.markers', 'REGISTRIES'
systemProperty 'forge.logging.console.level', 'debug'
programArguments '-mixin.config=marioverse.mixins.json'
modSource project.sourceSets.main
}
client {
workingDirectory 'run'
client true
server false
dataGenerator false
gameTest false
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
programArguments.addAll '--username', 'WenXin2'
}
server {
workingDirectory 'run'
client false
server true
dataGenerator false
gameTest false
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
}
gameTestServer {
workingDirectory 'run'
client false
server false
dataGenerator false
gameTest true
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
}
data {
workingDirectory 'run'
client false
server false
dataGenerator true
gameTest false
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
programArguments.addAll '--mod', 'marioverse', '--all', '--output',
file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
}
}
// Include resources generated by data generators.
sourceSets.main.resources { srcDir 'src/generated/resources' }
println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
tasks.withType(ProcessResources).configureEach {
var replaceProperties = [
minecraft_version : minecraft_version,
minecraft_version_range : minecraft_version_range,
neo_version : neo_version,
neo_version_range : neo_version_range,
loader_version_range : loader_version_range,
mod_id : mod_id,
mod_name : mod_name,
mod_license : mod_license,
mod_version : mod_version,
mod_authors : mod_authors,
mod_description : mod_description,
mixin_configs : mixin_location
]
inputs.properties replaceProperties
filesMatching(['META-INF/neoforge.mods.toml', '*.mixins.json']) {
expand replaceProperties
}
}
publishing {
publications {
register('mavenJava', MavenPublication) {
from components.java
}
}
repositories {
maven {
url "file://${project.projectDir}/repo"
}
// maven {
// name = 'GeckoLib'
// url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/'
// content {
// includeGroup("software.bernie.geckolib")
// }
// }
// maven {
// url = "https://jitpack.io"
// }
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
idea {
module {
downloadSources = true
downloadJavadoc = true
}
}