forked from TeamTwilight/twilightforest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
198 lines (168 loc) · 6.26 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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
buildscript {
repositories {
maven { url = 'https://maven.minecraftforge.net/' }
maven { url = 'https://maven.parchmentmc.org' }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath 'org.parchmentmc:librarian:1.+'
}
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.parchmentmc.librarian.forgegradle'
apply plugin: 'maven-publish'
apply plugin: 'eclipse'
apply from: 'https://raw.githubusercontent.com/SizableShrimp/Forge-Class-Remapper/main/classremapper.gradle'
version = (hasProperty("CIRevision") ? CIRevision : mod_version)
group = group_name
archivesBaseName = "${mod_id}-${minecraft_version}"
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
compileJava.options.compilerArgs << "-Xlint:all,-classfile,-processing,-deprecation" << "-Werror"
minecraft {
//mappings channel: "official", version: "1.19.2"
// https://ldtteam.jfrog.io/ui/native/parchmentmc-public/org/parchmentmc/data
mappings channel: 'parchment', version: '1.18.2-2022.07.03-1.19.2'
//version = minecraft_version + "-" + forge_version // grab latest forge
//makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
runs {
client {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
property 'fml.earlyprogresswindow', 'false'
property 'mixin.env.disableRefMap', 'true'
mods {
twilightforest {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
property 'forge.logging.console.level', 'debug'
property 'mixin.env.disableRefMap', 'true'
mods {
twilightforest {
source sourceSets.main
}
}
}
gameTestServer {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
property 'forge.enabledGameTestNamespaces', 'twilightforest'
mods {
twilightforest {
source sourceSets.main
}
}
}
data {
workingDirectory project.file('run')
properties 'fml.earlyprogresswindow': 'false'
property 'mixin.env.disableRefMap', 'true'
mods {
twilightforest {
source sourceSets.main
}
}
args '--mod', 'twilightforest', '--all',
'--existing', '"' + file('src/main/resources/') + '"',
'--existing', '"' + file('src/generated/resources/') + '"',
'--output', '"' + file('src/generated/resources/') + '"'
}
}
}
sourceSets.main.resources {
srcDir 'src/generated/resources'
}
compileJava {
options.encoding = 'UTF-8'
}
jar {
classifier = 'universal'
manifest {
attributes(["Specification-Title" : "Twilight Forest",
"Specification-Vendor" : "TeamTwilight",
"Specification-Version" : "${version}",
"Implementation-Title" : project.name,
"Implementation-Version" : "${version}",
"Implementation-Vendor" : "TeamTwilight",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")],)
}
}
repositories {
maven {
name 'progwm\'s Maven' // JEI
url 'https://dvs1.progwml6.com/files/maven'
}
maven {
name 'tterrag\'s Maven' // CTM
url 'https://maven.tterrag.com/'
}
maven {
name 'theillusivec4\'s Maven' // Curios
url 'https://maven.theillusivec4.top/'
}
maven {
name 'Tama\'s Maven' // Cross-Dim Commands
url "https://maven.tamaized.com/releases"
}
maven {
name 'Curseforge Maven' // Jade
url "https://www.cursemaven.com"
content {
includeGroup "curse.maven"
}
}
}
dependencies {
// progwml6
implementation fg.deobf("mezz.jei:jei-${project.minecraft_sub_version}-forge:${jei_version}")
// tterrag
//implementation fg.deobf("team.chisel.ctm:CTM:${minecraft_version}-${ctm_version}")
// theillusivec4
implementation fg.deobf("top.theillusivec4.curios:curios-forge:${project.minecraft_sub_version}-${curios_version}")
//curse maven
implementation fg.deobf("curse.maven:jade-324717:4054920-api-4054921")
runtimeOnly fg.deobf("curse.maven:just-enough-effect-descriptions-jeed-532286:3944903")
//bookshelf apparently prevents datagen from running, uncomment these if you need to test botany pot compat
//runtimeOnly fg.deobf("curse.maven:bookshelf-228525:3964325")
//runtimeOnly fg.deobf("curse.maven:botanypots-353928:3974733")
compileOnly fg.deobf("curse.maven:the-one-probe-245211:3965693")
//mods we dont have compat with but are nice to have
runtimeOnly fg.deobf("team-twilight:crossdimcommands:${project.minecraft_version}-1.0")
minecraft "net.minecraftforge:forge:${project.minecraft_sub_version}-${project.forge_version}"
}
jar.finalizedBy('reobfJar')
publishing {
publications {
mavenJava(MavenPublication) {
afterEvaluate {
artifact project.jar
artifact project.sourceJar
}
setGroupId 'teamtwilight'
setArtifactId project.mod_id
}
}
repositories {
maven {
//url "file:///${project.projectDir}/mcmodsrepo"
url "https://modmaven.dev:443/artifactory/local-releases"
credentials {
username System.getenv('ARTIFACTORY_USER')
password System.getenv('ARTIFACTORY_PASS')
}
}
}
}
task sourceJar(type: Jar, dependsOn: 'classes') {
from sourceSets.main.allSource
classifier = 'sources'
}