Skip to content

Support compile and runtime scopes for a library in the output pom #321

@daviddawson

Description

@daviddawson

Currently shadow jar will put all non shaded dependencies into the runtime scope, even if they were originally, logically at least, in the "compile" scope

This is done here -> https://github.com/johnrengelman/shadow/blob/master/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowJavaPlugin.groovy#L78

This causes problems in libraries that require their dependencies in the compile scope (ie, they use a transitive dependency class in their public api).

It would be good to be able have a shadowCompile option in the dependencies block that means the jar is put into the compile scope in the pom rather than runtime.

Shadow Version

2.0.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions