updated maven publication to remove transitive dependencies

This commit is contained in:
Sxtanna 2020-07-29 17:42:42 -04:00
parent 63134f4d74
commit 592f093566

View File

@ -33,15 +33,9 @@ dependencies {
testRuntime "org.junit.jupiter:junit-jupiter-engine:5.6.2" testRuntime "org.junit.jupiter:junit-jupiter-engine:5.6.2"
} }
import org.apache.tools.ant.filters.ReplaceTokens
processResources { processResources {
from(sourceSets.main.resources.srcDirs) { from(sourceSets.main.resources.srcDirs) {
filter ReplaceTokens, tokens: [ filter org.apache.tools.ant.filters.ReplaceTokens, tokens: [name: rootProject.name, version: project.version.toString(), description: project.description]
name: rootProject.name,
version: project.version.toString(),
description: project.description
]
} }
} }
@ -82,7 +76,6 @@ sourceSets {
publishing { publishing {
repositories { repositories {
maven { maven {
if (version.contains("-DEV-")) { if (version.contains("-DEV-")) {
url = uri("https://repo.extendedclip.com/content/repositories/dev/") url = uri("https://repo.extendedclip.com/content/repositories/dev/")
} else { } else {
@ -97,8 +90,12 @@ publishing {
} }
publications { publications {
maven(MavenPublication) { mavenJava(MavenPublication) {
from(components.java) from components.java
pom.withXml {
asNode().remove(asNode().get("dependencies"))
}
} }
} }
} }