Skip to content

Commit 1291ec0

Browse files
committed
Temporarily disable Shadow plugin
Forge buildscript uses some exposed API of the buildSrc classes I just moved (mostly ASM). Workaround for now is to just disable the shadow jar so the workspace can continue to work. Again, that will be part of a later cleanup. ForgeDev does not need to be as polished as ForgeGradle (which will resume development soon).
1 parent eac500f commit 1291ec0

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

build.gradle

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
2-
import com.github.jengelman.gradle.plugins.shadow.ShadowJavaPlugin
3-
import org.gradle.api.attributes.plugin.GradlePluginApiVersion
42

53
plugins {
64
id 'java-gradle-plugin'
@@ -12,8 +10,7 @@ plugins {
1210
alias libs.plugins.gitversion
1311
alias libs.plugins.changelog
1412
alias libs.plugins.licenser
15-
alias libs.plugins.plugin.publish
16-
alias libs.plugins.shadow
13+
alias libs.plugins.shadow apply false
1714
}
1815

1916
gradleutils.displayName = 'ForgeDev'
@@ -26,7 +23,6 @@ println "Version: $version"
2623
java {
2724
toolchain.languageVersion = JavaLanguageVersion.of(17)
2825
withSourcesJar()
29-
withJavadocJar()
3026
}
3127

3228
gradleutils.pluginDevDefaults(configurations, libs.versions.gradle)
@@ -62,10 +58,12 @@ tasks.named('jar', Jar) {
6258
archiveClassifier = 'thin'
6359
}
6460

65-
tasks.named('shadowJar', ShadowJar) {
66-
enableAutoRelocation = true
67-
archiveClassifier = null
68-
relocationPrefix = 'net.minecraftforge.forgedev.shadow'
61+
pluginManager.withPlugin(libs.plugins.shadow.get().pluginId) {
62+
tasks.named('shadowJar', ShadowJar) {
63+
enableAutoRelocation = true
64+
archiveClassifier = null
65+
relocationPrefix = 'net.minecraftforge.forgedev.shadow'
66+
}
6967
}
7068

7169
tasks.withType(Javadoc).configureEach {

settings.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ dependencyResolutionManagement.versionCatalogs.register('libs') {
2626
plugin 'gradleutils', 'net.minecraftforge.gradleutils' versionRef 'gradleutils'
2727
plugin 'gitversion', 'net.minecraftforge.gitversion' version '3.1.6'
2828
plugin 'changelog', 'net.minecraftforge.changelog' version '3.1.3'
29-
plugin 'plugin-publish', 'com.gradle.plugin-publish' version '2.0.0'
3029
plugin 'shadow', 'com.gradleup.shadow' version '9.2.2'
3130

3231
// Static Analysis

0 commit comments

Comments
 (0)