Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shadowJar task reports UP-TO-DATE with normal exclude. #62

Open
Grinch opened this issue Jun 30, 2014 · 3 comments
Open

shadowJar task reports UP-TO-DATE with normal exclude. #62

Grinch opened this issue Jun 30, 2014 · 3 comments
Labels

Comments

@Grinch
Copy link

Grinch commented Jun 30, 2014

Similar to the issue with #54, when I add an exclude option to the shadowJar block it doesn't update my JAR appropriately. The below code doesn't update my jar when the shaders folder is present on the root of it.

shadowJar {
    classifier = ''
    destinationDir = file("build/distributions")
    dependencies {
        include(dependency('org.obsidianbox.magma:magma:1.0.0-SNAPSHOT'))
        include(dependency('org.spout:caustic-api:1.0.0-SNAPSHOT'))
        include(dependency('org.spout:caustic-lwjgl:1.0.0-SNAPSHOT'))
    }
    exclude 'shaders/'
}
@johnrengelman johnrengelman added this to the 1.0.2 milestone Jul 1, 2014
@johnrengelman
Copy link
Owner

hmm, yeah...this is going to be a tough one. The problem here is that the contents of the jars themselves aren't actually included in the source from the perspective of AbstractCopyTask. So i'll probably need to add a new property to track these things, but I'll need to do it in an efficient manner.

@Grinch
Copy link
Author

Grinch commented Jul 2, 2014

No worries, it isn't too critical for me at the moment so whenever you can come upon a suitable fix is fine. :) Just waiting on 2.0 compatibility for the moment. ;)

@johnrengelman johnrengelman modified the milestones: 1.1.0, 1.0.2 - Bug fixes Jul 2, 2014
@johnrengelman johnrengelman modified the milestones: 1.0.4, 1.0.3 Jul 16, 2014
@johnrengelman johnrengelman removed this from the 1.0.4 milestone Aug 25, 2014
@johnrengelman johnrengelman added this to the 2.0.0 milestone Nov 11, 2014
@johnrengelman johnrengelman removed this from the 5.0.0 milestone Jan 20, 2019
@autonomousapps
Copy link

I just ran into this with 7.0.0. I wanted to exclude some Kotlin cruft, so I added

shadowJar.exclude '**/*.kotlin_metadata'

and it didn't seem to be doing anything, till I deleted the jar and reran the shadowJar task. Then I could see my exclude worked. I have resorted to using shadowJar.outputs.upToDateWhen { false }. I'm actually not sure if this is more properly a Gradle bug, since exclude is a function on AbstractCoptyTask.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants