1
1
plugins {
2
- id ' fabric-loom' version ' 0.11 -SNAPSHOT'
2
+ id ' fabric-loom' version ' 1.1 -SNAPSHOT'
3
3
id ' maven-publish'
4
4
id ' com.matthewprenger.cursegradle' version ' 1.4.0'
5
- id ' com.modrinth.minotaur' version ' 1.2.1 '
5
+ id ' com.modrinth.minotaur' version ' 2.7.5 '
6
6
id " com.github.breadmoirai.github-release" version " 2.2.12"
7
7
}
8
8
@@ -38,9 +38,10 @@ dependencies {
38
38
39
39
modImplementation " net.fabricmc.fabric-api:fabric-api:${ project.fabric_api_version} "
40
40
41
- modImplementation(include(" de.siphalor:amecsapi-$minecraft_major_version :1.3.9+ " )) {
41
+ modImplementation(include(" de.siphalor:amecsapi-$minecraft_major_version :$a mecs_api_version " )) {
42
42
exclude group : " net.fabricmc.fabric-api"
43
43
}
44
+ modCompileOnly(modLocalRuntime(" de.siphalor:nmuk-$minecraft_major_version :$nmuk_version " ))
44
45
45
46
testmodImplementation sourceSets. main. output
46
47
}
@@ -60,14 +61,15 @@ processResources {
60
61
// ensure that the encoding is set to UTF-8, no matter what the system default is
61
62
// this fixes some edge cases with special characters not displaying correctly
62
63
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
63
- tasks. withType(JavaCompile ) {
64
+ tasks. withType(JavaCompile ). configureEach {
64
65
options. encoding = " UTF-8"
65
66
}
66
67
67
68
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
68
69
// if it is present.
69
70
// If you remove this task, sources will not be generated.
70
- task sourcesJar (type : Jar , dependsOn : classes) {
71
+ tasks. register(' sourcesJar' , Jar ) {
72
+ dependsOn classes
71
73
archiveClassifier. set(" sources" )
72
74
from sourceSets. main. allSource
73
75
}
79
81
// configure the maven publication
80
82
publishing {
81
83
publications {
82
- mavenJava( MavenPublication ) {
84
+ create( " mavenJava " , MavenPublication ) {
83
85
artifactId = " ${ project.archives_base_name} -${ project.minecraft_major_version} "
84
86
85
87
from components. java
@@ -107,9 +109,9 @@ static def getChangelog() {
107
109
return ' git log -1 --format=format:##%x20%s%n%n%b%nRelease%x20by%x20%an --grep Version' . execute(). text. trim()
108
110
}
109
111
110
- task uploadToModSites {
111
- dependsOn build
112
- group = " upload"
112
+ tasks . register( ' uploadToModSites' ) {
113
+ dependsOn build
114
+ group = " upload"
113
115
}
114
116
115
117
if (project. hasProperty(" siphalorCurseForgeApi" )) {
@@ -136,26 +138,21 @@ if (project.hasProperty("siphalorCurseForgeApi")) {
136
138
uploadToModSites. finalizedBy(tasks. curseforge)
137
139
}
138
140
139
- import com.modrinth.minotaur.TaskModrinthUpload
140
- if (project. hasProperty(" siphalorModrinthApi" )) {
141
- task modrinth (type : TaskModrinthUpload ) {
142
- group = " upload"
143
- dependsOn(build)
144
-
145
- token = project. siphalorModrinthApi
146
- projectId = " rcLriA4v"
147
- versionNumber = version
148
- versionName = " [${ project.mod_mc_version_specifier} ] ${ project.mod_version} "
149
- changelog = getChangelog()
150
- uploadFile = remapJar
151
- versionType = project. mod_release
152
- for (version in ((String ) project. mod_mc_versions). split(" ;" )) {
153
- addGameVersion(version)
154
- }
155
- addLoader(" fabric" )
156
- }
157
- uploadToModSites. finalizedBy(tasks. modrinth)
141
+ modrinth {
142
+ if (project. hasProperty(" modrinthToken" )) {
143
+ token = project. modrinthToken
144
+ uploadToModSites. finalizedBy(tasks. modrinth)
145
+ }
146
+
147
+ projectId = " rcLriA4v"
148
+ versionName = " [${ project.mod_mc_version_specifier} ] ${ project.mod_version} "
149
+ versionType = project. mod_release
150
+ changelog = project. getChangelog()
151
+ uploadFile = remapJar
152
+ gameVersions. set(project. mod_mc_versions. split(" ;" ) as List<String > )
153
+ loaders. set([" fabric" ])
158
154
}
155
+ tasks. modrinth. group = " upload"
159
156
160
157
if (project. hasProperty(" siphalorGitHubToken" )) {
161
158
githubRelease {
0 commit comments