-
Notifications
You must be signed in to change notification settings - Fork 117
/
Copy pathbuild.gradle
240 lines (193 loc) · 8.46 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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
buildscript {
repositories {
mavenCentral()
}
dependencies {
// Make sure this version matches the one included in Kotlin for Forge
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10'
// OPTIONAL Gradle plugin for Kotlin Serialization
classpath 'org.jetbrains.kotlin:kotlin-serialization:1.6.10'
}
}
plugins {
id "com.github.johnrengelman.shadow" version "7.1.2"
id "org.jetbrains.kotlin.jvm"
id "com.matthewprenger.cursegradle"
id "com.modrinth.minotaur"
}
apply from: '../gradle-scripts/publish-curseforge.gradle'
architectury {
platformSetupLoomIde()
forge()
}
loom {
accessWidenerPath = project(":common").loom.accessWidenerPath
forge {
mixinConfig "valkyrienskies-common.mixins.json"
mixinConfig "valkyrienskies-forge.mixins.json"
convertAccessWideners.set(true)
extraAccessWideners.add loom.accessWidenerPath.get().asFile.name
}
mixin {
defaultRefmapName = "valkyrienskies-refmap.json"
}
}
configurations {
common
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
core
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
developmentForge.extendsFrom common
compileClasspath.extendsFrom core
forgeRuntimeLibrary.extendsFrom core
shadowCommon.extendsFrom core
}
dependencies {
implementation(annotationProcessor("io.github.llamalad7:mixinextras-common:0.3.5"))
implementation(include("io.github.llamalad7:mixinextras-forge:0.3.5"))
annotationProcessor("net.fabricmc:sponge-mixin:0.12.5+mixin.0.8.5") // use fabric mixin so we can write interface injectors (conditionally loaded if mixinbooster is enabled)
forge "net.minecraftforge:forge:${rootProject.forge_version}"
common(project(path: ":common", configuration: "namedElements")) {
transitive = false
}
shadowCommon(project(path: ":common", configuration: "transformProductionForge")) {
transitive = false
}
//modCompileOnly("curse.maven:rubidium-574856:4024781")
modCompileOnly("maven.modrinth:embeddium:${embeddium_version}")
// Twilight Forest
modImplementation("teamtwilight:twilightforest:${twilightforest_version}:universal")
// Create compat
modImplementation("com.simibubi.create:create-${minecraft_version}:${create_version}:slim") { transitive = false }
modImplementation("com.jozufozu.flywheel:flywheel-forge-${minecraft_version}:${flywheel_version}")
modImplementation("com.tterrag.registrate:Registrate:${registrate_version}")
// Weather2 1.20.1
modImplementation("curse.maven:weather-storms-tornadoes-237746:5244118")
modImplementation("curse.maven:coroutil-237749:5096038")
// EMF compat
modCompileOnly("curse.maven:entity-model-features-844662:5696899")
modCompileOnly("curse.maven:entity-texture-features-fabric-568563:5697083")
modCompileOnly("maven.modrinth:create-utilities:0.2.0+1.20.1")
modImplementation("teamreborn:energy:${energy_version}") {
transitive = false
}
// TIS-3d
modCompileOnly("maven.modrinth:tis3d:${tis3d_version}")
// Modular Routers
modCompileOnly("curse.maven:mr-250294:4696089")
// Integrated Dynamics
modCompileOnly("curse.maven:integrated-dynamics-236307:5297722")
modCompileOnly("curse.maven:cyclops-core-232758:5262063")
modCompileOnly("curse.maven:common-capabilities-247007:4987207")
// Mekanism
modCompileOnly ("curse.maven:mekanism-268560:4644795")
// Modular Force Field System
modCompileOnly("maven.modrinth:mffs:5.1.18")
// Add Kotlin for Forge (3.12.0)
forgeRuntimeLibrary("maven.modrinth:kotlin-for-forge:${kotlin_version}")
// Cloth for config
include(modImplementation("me.shedaniel.cloth:cloth-config-forge:${cloth_config_version}"))
// Shade vs-core
implementation("org.valkyrienskies.core:impl:${rootProject.vs_core_version}"){
exclude group: 'org.joml', module: 'joml'
}
forgeRuntimeLibrary shadowCommon("org.valkyrienskies.core:impl:${rootProject.vs_core_version}") {
exclude group: 'org.joml', module: 'joml'
transitive = false
}
// region Manually include every single dependency of vs-core (total meme)
forgeRuntimeLibrary include("org.valkyrienskies.core:api:${rootProject.vs_core_version}") {
exclude group: 'org.joml', module: 'joml'
transitive = false
}
forgeRuntimeLibrary shadowCommon("org.valkyrienskies.core:api-game:${rootProject.vs_core_version}") {
exclude group: 'org.joml', module: 'joml'
transitive = false
}
forgeRuntimeLibrary include("org.valkyrienskies.core:util:${rootProject.vs_core_version}") {
exclude group: 'org.joml', module: 'joml'
transitive = false
}
forgeRuntimeLibrary shadowCommon("org.valkyrienskies:physics_api_krunch:1.0.0+7db6a103f1") {
exclude group: 'org.joml', module: 'joml'
transitive = false
}
forgeRuntimeLibrary shadowCommon("org.valkyrienskies:physics_api:1.0.0+0ba0cc41e1") {
exclude group: 'org.joml', module: 'joml'
transitive = false
}
forgeRuntimeLibrary include("javax.inject:javax.inject:1") { transitive = false }
// JOML for Math
forgeRuntimeLibrary include("org.joml:joml-primitives:1.10.0")
// Apache Commons Math for Linear Programming
forgeRuntimeLibrary include("org.apache.commons:commons-math3:3.6.1") { transitive = false }
// Jackson Binary Dataformat for Object Serialization
def jacksonVersion = '2.14.0'
// forked to remove module-info
forgeRuntimeLibrary include("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion-rubyfork") { transitive = false }
forgeRuntimeLibrary include("com.fasterxml.jackson.module:jackson-module-parameter-names:$jacksonVersion") { transitive = false }
forgeRuntimeLibrary include("com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:$jacksonVersion") { transitive = false }
forgeRuntimeLibrary include("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion") { transitive = false }
forgeRuntimeLibrary include("com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion") { transitive = false }
forgeRuntimeLibrary include("com.fasterxml.jackson.core:jackson-core:$jacksonVersion") { transitive = false }
forgeRuntimeLibrary include("com.github.Rubydesic:jackson-kotlin-dsl:1.2.0") { transitive = false }
forgeRuntimeLibrary include("com.networknt:json-schema-validator:1.0.71") { transitive = false }
forgeRuntimeLibrary include("com.ethlo.time:itu:1.7.0") { transitive = false }
forgeRuntimeLibrary include("com.github.victools:jsonschema-module-jackson:4.25.0") { transitive = false }
forgeRuntimeLibrary include("com.github.victools:jsonschema-generator:4.25.0") { transitive = false }
forgeRuntimeLibrary include("com.fasterxml:classmate:1.5.1") { transitive = false }
forgeRuntimeLibrary include("com.flipkart.zjsonpatch:zjsonpatch:0.4.11") { transitive = false }
forgeRuntimeLibrary include("org.apache.commons:commons-collections4:4.3") { transitive = false }
forgeRuntimeLibrary include("com.google.dagger:dagger:2.43.2") { transitive = false }
// endregion
}
processResources {
inputs.property "version", project.version
filesMatching("META-INF/mods.toml") {
expand "version": project.version
}
}
shadowJar {
exclude "fabric.mod.json"
exclude "architectury.common.json"
// Exclude dummy Optifine classes
exclude "net/optifine/**"
configurations = [project.configurations.shadowCommon]
archiveClassifier.set "dev-shadow"
}
remapJar {
input.set shadowJar.archiveFile
dependsOn shadowJar
archiveClassifier.set null
}
compileKotlin {
kotlinOptions.jvmTarget = '17'
}
jar {
archiveClassifier.set "dev"
}
sourcesJar {
def commonSources = project(":common").sourcesJar
dependsOn commonSources
from commonSources.archiveFile.map { zipTree(it) }
}
components.java {
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
skip()
}
}
publishing {
publications {
mavenForge(MavenPublication) {
groupId = "org.valkyrienskies"
version = project.version
artifactId = rootProject.archives_base_name + "-" + project.name
// Publish the dev shadow jar to maven
artifact(shadowJar) {
classifier "dev-shadow"
}
from components.java
}
}
}