Skip to content

Commit

Permalink
Customize publishing a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed Dec 19, 2023
1 parent 2db0123 commit 1af203b
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id 'net.neoforged.gradleutils'
}

group = 'net.neoforged'
group = "net.neoforged"
project.version = gradleutils.version

jar {
Expand Down Expand Up @@ -44,3 +44,25 @@ test {
assemble.configure {
dependsOn shadowJar
}

// This skips the shadowjar from being published as part of the normal publication
components.java.withVariantsFromConfiguration(configurations.shadowRuntimeElements) {
skip()
}

publishing {
publications {
// This publication only contains the unshaded jar with dependencies in the pom.xml
plain(MavenPublication) {
artifactId = 'apply-parchment'

from components.java
}
// This publication only contains the shaded standalone jar
bundle(MavenPublication) {
artifactId = 'apply-parchment-bundle'

project.shadow.component(bundle)
}
}
}

0 comments on commit 1af203b

Please sign in to comment.