Gradle: Plugin & My API

Hello,
I’m taking the development of one of my plugin, I only have a little trouble configuring Gradle.

The structure of my project is:
my-plugin:
|
| -> API
| |->build.gradle
| -> Imp
| |->build.gradle
|
| -> settings.gradle
| -> build.gradle

My implementation and my API implementation depend both on Sponge API but my implementation also depends on my API. The implementation is of the API so in the API should be included the final jar.
Currently I can’t do this step: Include my compiled API in the final jar.

Suggestions?

You can use the shadow plugin in Gradle to include a library in the final jar:

If you do use the shadow plugin, you’ll need to make sure you replace compile 'org.spongepowered:spongeapi:<version>' with shadow 'org.spongepowered:spongeapi:<version>' to make sure SpongeAPI isn’t inclued in your JAR.

Or use the built in to ForgeGradle Shade. Example.