1
1
plugins {
2
- id ' fabric-loom' version ' 1.2 .+'
2
+ id ' fabric-loom' version ' 1.3 .+'
3
3
id ' io.github.juuxel.loom-quiltflower' version ' 1.8.+'
4
4
id ' org.quiltmc.gradle.licenser' version ' 2.0.+'
5
5
id ' java-library'
6
6
id ' maven-publish'
7
- id ' com.github.johnrengelman.shadow' version ' 7 .1.2 '
7
+ id ' com.github.johnrengelman.shadow' version ' 8 .1.1 '
8
8
id ' com.modrinth.minotaur' version ' 2.+'
9
9
id ' com.matthewprenger.cursegradle' version ' 1.4.+'
10
10
}
@@ -13,11 +13,16 @@ import com.modrinth.minotaur.dependencies.ModDependency
13
13
14
14
group = project. maven_group
15
15
version = " ${ project.mod_version} +${ project.minecraft_version} "
16
- archivesBaseName = project. archives_base_name
16
+ base . archivesName = project. archives_base_name
17
17
18
18
// This field defines the Java version your mod target.
19
19
def targetJavaVersion = 17
20
20
21
+ if (! (System . getenv(" CURSEFORGE_TOKEN" ) || System . getenv(" MODRINTH_TOKEN" ))) {
22
+ version + = " -local"
23
+ }
24
+ logger. lifecycle(" Preparing version ${ version} ..." )
25
+
21
26
boolean isMCVersionNonRelease () {
22
27
return project. minecraft_version. matches(' ^\\ d\\ dw\\ d\\ d[a-z]$' )
23
28
|| project. minecraft_version. matches(' \\ d+\\ .\\ d+-(pre|rc)(\\ d+)' )
@@ -130,7 +135,7 @@ dependencies {
130
135
transitive = false
131
136
}
132
137
133
- modImplementation " maven.modrinth:sodium:${ project.sodium_version} "
138
+ modRuntimeOnly " maven.modrinth:sodium:${ project.sodium_version} "
134
139
135
140
shadow ' com.electronwill.night-config:core:3.6.6'
136
141
shadow ' com.electronwill.night-config:toml:3.6.6'
@@ -159,7 +164,7 @@ processResources {
159
164
160
165
jar {
161
166
from(' LICENSE' ) {
162
- rename { " ${ it} _${ project.archivesBaseName } " }
167
+ rename { " ${ it} _${ base.archivesName } " }
163
168
}
164
169
}
165
170
@@ -171,7 +176,7 @@ license {
171
176
shadowJar {
172
177
dependsOn jar
173
178
configurations = [project. configurations. shadow]
174
- destinationDirectory. set(file(" ${ project.buildDir } /devlibs" ))
179
+ destinationDirectory. set(file(" ${ project.layout.buildDirectory.get() } /devlibs" ))
175
180
archiveClassifier. set(' dev' )
176
181
177
182
relocate ' com.electronwill.nightconfig' , ' dev.lambdaurora.lambdynlights.shadow.nightconfig'
0 commit comments