Skip to content

Minimize - Excluding a project does not exclude its dependencies #419

@rpalcolea

Description

@rpalcolea

Shadow Version

4.0.2

Gradle Version

4.10.2

Expected Behavior

I believe it would make sense to exclude dependencies from a project that got excluded, because by excluding project, I think the intention is to make sure the project and its dependencies are not getting scanned/removed.

Actual Behavior

When using minimize with a subproject

            apply plugin: 'java'
            apply plugin: 'com.github.johnrengelman.shadow'
             shadowJar {
                minimize {
                    exclude(project(':client'))
                }
            }
             repositories { mavenCentral() }
            dependencies { compile project(':client') }

And client project looks like

 apply plugin: 'java'
 repositories { mavenCentral() }
dependencies { compile 'junit:junit:3.8.2' }

The classes in client are included in the JAR because we excluded them. However, dependencies of the project are not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions