# New java-library plugin and shadowJar

**URL:** <https://discuss.gradle.org/t/new-java-library-plugin-and-shadowjar/21800>\
**Category:** Help/Discuss\
**Created:** [March 1, 2017, 9:29pm UTC](https://discuss.gradle.org/t/new-java-library-plugin-and-shadowjar/21800 "2017-03-01T21:29:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sc1478](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/sc1478/32/4341_2.png) [@sc1478](https://discuss.gradle.org/u/sc1478)\
**Post date:** [March 1, 2017, 9:29pm UTC](https://discuss.gradle.org/t/new-java-library-plugin-and-shadowjar/21800/1 "2017-03-01T21:29:55Z")

</div>

I’m guessing that this is something for the Shadow plugin guys to deal with, but the new api and implementation configuration types do not work as I was expecting with shadowJar. Base on the [documentation](https://docs.gradle.org/current/userguide/java_library_plugin.html), I would have expected that dependencies with the `api` config would be included and those with the `implementation` config would not. My expectations were wrong. Only by specifying the dependencies with the `compile` config are they picked up by shadow.

So, either my expectations were wrong, or shadow needs to be updated to take advantage of this feature.

---

<div class="post-metadata">

**Author:** ![st\_oehme](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/st_oehme/32/5249_2.png) [@st\_oehme](https://discuss.gradle.org/u/st_oehme)\
**Post date:** [March 2, 2017, 1:48pm UTC](https://discuss.gradle.org/t/new-java-library-plugin-and-shadowjar/21800/2 "2017-03-02T13:48:17Z")

</div>

My assumption is that the Shadow plugin has `compile` hardcoded somewhere instead of using `sourceSets.main.compileClasspath`. Can you open an issue for them?

---

<div class="post-metadata">

**Author:** ![sc1478](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/sc1478/32/4341_2.png) [@sc1478](https://discuss.gradle.org/u/sc1478)\
**Post date:** [March 2, 2017, 2:53pm UTC](https://discuss.gradle.org/t/new-java-library-plugin-and-shadowjar/21800/3 "2017-03-02T14:53:04Z")

</div>

That would be my guess as well.

> <https://github.com/johnrengelman/shadow/issues/275>
