Skip to content

Commit cc82818

Browse files
committed
Update build file for shadowing
1 parent 8a96d12 commit cc82818

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,17 @@ buildscript {
66

77
dependencies {
88
classpath "net.minecraftforge.gradle:ForgeGradle:5.1.+"
9-
classpath 'com.github.jengelman.gradle.plugins:shadow:6.1.0'
109
}
1110
}
1211

1312
plugins {
1413
id "idea"
1514
id "eclipse"
1615
id "maven-publish"
17-
id 'com.github.johnrengelman.shadow' version '6.1.0'
16+
id 'com.github.johnrengelman.shadow' version '7.1.0'
1817
}
1918

2019
apply plugin: "net.minecraftforge.gradle"
21-
apply plugin: 'com.github.johnrengelman.shadow'
2220

2321
def gitCommitHash = 'git rev-parse --verify --short HEAD'.execute().text.trim()
2422
def isRelease = (System.getenv("CM_RELEASE") ?: "false").equalsIgnoreCase("true")
@@ -291,12 +289,12 @@ shadowJar {
291289
}
292290

293291
jar {
292+
classifier("slim")
294293
from sourceSets.api.output
295294
from sourceSets.main.output
296295

297296
destinationDir = file("$rootDir/build-out")
298297
finalizedBy('reobfJar')
299-
finalizedBy('reobfShadowJar')
300298

301299
manifest {
302300
attributes([
@@ -326,7 +324,7 @@ task testJar(type: Jar) {
326324
}
327325

328326
artifacts {
329-
archives jar, apiJar, testJar
327+
archives jar, shadowJar, apiJar, testJar
330328
}
331329

332330
publishing {
@@ -335,6 +333,7 @@ publishing {
335333
artifactId = mod_id
336334
artifacts {
337335
artifact jar
336+
artifact(shadowJar)
338337
artifact(apiJar) {
339338
classifier = "api"
340339
}
@@ -346,6 +345,7 @@ publishing {
346345
artifactId = mod_id
347346
artifacts {
348347
artifact(jar)
348+
artifact(shadowJar)
349349
artifact(apiJar) {
350350
classifier = "api"
351351
}

0 commit comments

Comments
 (0)