Skip to content

Commit

Permalink
Merge pull request #2972 from Multiverse/dtm/fix_pom_deps
Browse files Browse the repository at this point in the history
Fix dependency set for maven pom.
  • Loading branch information
dumptruckman authored Aug 25, 2023
2 parents e2e0574 + 31f4f20 commit e9f55e4
Showing 1 changed file with 26 additions and 9 deletions.
35 changes: 26 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,26 @@ repositories {
}

dependencies {
compileOnly 'org.bukkit:bukkit:1.13.2-R0.1-SNAPSHOT'
implementation 'org.bukkit:bukkit:1.13.2-R0.1-SNAPSHOT'

implementation('com.github.MilkBowl:VaultAPI:1.7') {
exclude group: 'org.bukkit', module: 'bukkit'
}

api('me.main__.util:SerializationConfig:1.7') {
compileOnly('me.main__.util:SerializationConfig:1.7') {
exclude group: 'org.bukkit', module: 'bukkit'
}
api('com.pneumaticraft.commandhandler:CommandHandler:11') {
compileOnly('com.pneumaticraft.commandhandler:CommandHandler:11') {
exclude group: 'org.bukkit', module: 'bukkit'
exclude group: 'junit', module: 'junit'
}
api 'com.dumptruckman.minecraft:buscript:2.0-SNAPSHOT'
api 'org.bstats:bstats-bukkit:2.2.1'
api('com.dumptruckman.minecraft:Logging:1.1.1') {
compileOnly 'com.dumptruckman.minecraft:buscript:2.0-SNAPSHOT'
compileOnly 'org.bstats:bstats-bukkit:2.2.1'
compileOnly('com.dumptruckman.minecraft:Logging:1.1.1') {
exclude group: 'junit', module: 'junit'
}
api 'de.themoep.idconverter:mappings:1.2-SNAPSHOT'
api 'org.jetbrains:annotations:16.0.2'
compileOnly 'de.themoep.idconverter:mappings:1.2-SNAPSHOT'
compileOnly 'org.jetbrains:annotations:16.0.2'

testImplementation 'org.spigotmc:spigot-api:1.19.3-R0.1-SNAPSHOT'
testImplementation('com.googlecode.json-simple:json-simple:1.1.1') {
Expand Down Expand Up @@ -94,12 +94,29 @@ configurations {
it.outgoing.artifacts.removeIf { it.buildDependencies.getDependencies(null).contains(jar) }
it.outgoing.artifact(shadowJar)
}

testCompileOnly.extendsFrom compileOnly
testRuntimeOnly.extendsFrom testCompileOnly

shadowed.extendsFrom compileOnly {
canBeResolved = true
}
}

publishing {
publications {
maven(MavenPublication) {
from components.java

pom.withXml {
asNode().dependencies.'*'.findAll() {
it.scope.text() == 'runtime' && project.configurations.implementation.allDependencies.find { dep ->
dep.name == it.artifactId.text()
}
}.each() {
it.scope*.value = 'provided'
}
}
}
}
repositories {
Expand Down Expand Up @@ -169,7 +186,7 @@ shadowJar {
relocate 'org.codehaus.jettison', 'com.onarandombox.jettison'
relocate 'de.themoep.idconverter', 'com.onarandombox.idconverter'

configurations = [project.configurations.api]
configurations = [project.configurations.shadowed]

archiveFileName = "$baseName-$version.$extension"
classifier = ''
Expand Down

0 comments on commit e9f55e4

Please sign in to comment.