PaperMC / paperweight

Gradle build system plugin for Paper and Paper forks
240 stars 48 forks source link

PaperDevBundle dependency configuration seems to be ignored #204

Closed NichtStudioCode closed 1 year ago

NichtStudioCode commented 1 year ago

Using paperweight-userdev, I'm trying to exclude certain transitive dependencies from the paper dev bundle. However, the configuration made in the configurationAction does not seem to be applied.

As an example, I'd expect this configuration to exclude all transitive dependencies.

paperweight.paperDevBundle("1.20.1-R0.1-SNAPSHOT") { isTransitive = false }

However, when running gradlew dependencies, all transitive dependencies are still present:

\--- io.papermc.paper:paper-server:userdev-1.20.1-R0.1-SNAPSHOT
     +--- com.github.oshi:oshi-core:6.2.2
     |    +--- net.java.dev.jna:jna:5.12.1
     |    +--- net.java.dev.jna:jna-platform:5.12.1
     |    |    \--- net.java.dev.jna:jna:5.12.1
     |    \--- org.slf4j:slf4j-api:1.7.36 -> 2.0.1
     +--- com.google.code.gson:gson:2.10
     +--- com.google.guava:failureaccess:1.0.1
     +--- com.google.guava:guava:31.1-jre
     |    +--- com.google.guava:failureaccess:1.0.1
     |    +--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
     |    +--- com.google.code.findbugs:jsr305:3.0.2
     |    +--- org.checkerframework:checker-qual:3.12.0 -> 3.21.0
     |    +--- com.google.errorprone:error_prone_annotations:2.11.0
     |    \--- com.google.j2objc:j2objc-annotations:1.3
     +--- com.mojang:authlib:4.0.43
     +--- com.mojang:brigadier:1.1.8
     +--- com.mojang:datafixerupper:6.0.8
     |    +--- com.google.code.gson:gson:2.8.9 -> 2.10
     |    +--- com.google.guava:guava:31.0.1-jre -> 31.1-jre (*)
     |    +--- it.unimi.dsi:fastutil:8.5.6 -> 8.5.9
     |    \--- com.google.code.findbugs:jsr305:3.0.2
     +--- com.mojang:logging:1.1.1
     +--- com.velocitypowered:velocity-native:3.1.2-SNAPSHOT
     +--- commons-io:commons-io:2.11.0
 (and many more)

I'd expect it to just be this:

\--- io.papermc.paper:paper-server:userdev-1.20.1-R0.1-SNAPSHOT
jpenilla commented 1 year ago

The dev bundle has no transitive dependencies, the output you shared is of the server's dependency tree. The server is added to the mojangMappedServer configuration which the compile classpath then extends from. So any exclusions for server dependencies can be applied to mojangMappedServer.