Merge pull request #2972 from Multiverse/dtm/fix_pom_deps

Fix dependency set for maven pom.
This commit is contained in:
Jeremy Wood 2023-08-24 22:00:15 -04:00 committed by GitHub
commit e9f55e43ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 9 deletions

View File

@ -44,26 +44,26 @@ repositories {
} }
dependencies { 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') { implementation('com.github.MilkBowl:VaultAPI:1.7') {
exclude group: 'org.bukkit', module: 'bukkit' 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' 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: 'org.bukkit', module: 'bukkit'
exclude group: 'junit', module: 'junit' exclude group: 'junit', module: 'junit'
} }
api 'com.dumptruckman.minecraft:buscript:2.0-SNAPSHOT' compileOnly 'com.dumptruckman.minecraft:buscript:2.0-SNAPSHOT'
api 'org.bstats:bstats-bukkit:2.2.1' compileOnly 'org.bstats:bstats-bukkit:2.2.1'
api('com.dumptruckman.minecraft:Logging:1.1.1') { compileOnly('com.dumptruckman.minecraft:Logging:1.1.1') {
exclude group: 'junit', module: 'junit' exclude group: 'junit', module: 'junit'
} }
api 'de.themoep.idconverter:mappings:1.2-SNAPSHOT' compileOnly 'de.themoep.idconverter:mappings:1.2-SNAPSHOT'
api 'org.jetbrains:annotations:16.0.2' compileOnly 'org.jetbrains:annotations:16.0.2'
testImplementation 'org.spigotmc:spigot-api:1.19.3-R0.1-SNAPSHOT' testImplementation 'org.spigotmc:spigot-api:1.19.3-R0.1-SNAPSHOT'
testImplementation('com.googlecode.json-simple:json-simple:1.1.1') { testImplementation('com.googlecode.json-simple:json-simple:1.1.1') {
@ -94,12 +94,29 @@ configurations {
it.outgoing.artifacts.removeIf { it.buildDependencies.getDependencies(null).contains(jar) } it.outgoing.artifacts.removeIf { it.buildDependencies.getDependencies(null).contains(jar) }
it.outgoing.artifact(shadowJar) it.outgoing.artifact(shadowJar)
} }
testCompileOnly.extendsFrom compileOnly
testRuntimeOnly.extendsFrom testCompileOnly
shadowed.extendsFrom compileOnly {
canBeResolved = true
}
} }
publishing { publishing {
publications { publications {
maven(MavenPublication) { maven(MavenPublication) {
from components.java 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 { repositories {
@ -169,7 +186,7 @@ shadowJar {
relocate 'org.codehaus.jettison', 'com.onarandombox.jettison' relocate 'org.codehaus.jettison', 'com.onarandombox.jettison'
relocate 'de.themoep.idconverter', 'com.onarandombox.idconverter' relocate 'de.themoep.idconverter', 'com.onarandombox.idconverter'
configurations = [project.configurations.api] configurations = [project.configurations.shadowed]
archiveFileName = "$baseName-$version.$extension" archiveFileName = "$baseName-$version.$extension"
classifier = '' classifier = ''