-
Notifications
You must be signed in to change notification settings - Fork 35
Release normal jar and fat jar at the same time #869
Comments
After a quick check, my suggestion is to create a separate submodule in your project called
|
Marcin thanks for help. I will definitely try your solution. On the other hand I'm wondering if I can publish multiple artifacts with ship. Take a look on my configuration: build.gradle https://github.com/magx2/jSuplaApi/blob/master/build.gradle#L71
shipkit.gradle https://github.com/magx2/jSuplaApi/blob/master/gradle/shipkit.gradle#L16
Don't you think this should work? |
It doesn't work :-( (I checked your build and publication history). But the trick with submodule work! |
IMHO opinion it would be nice that shipkit recognizes and uses different publications but it might be discussion for another time. For those who has similar problem I paste my solution:
plugins {
id 'java'
}
group = 'xxx.yyy.zzz'
dependencies {
implementation rootProject
}
jar {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
}
You can find full change set here magx2/jSuplaApi@8a6e0ba |
I am also interested in this feature but do not want to create a separate submodule. Instead, I want to apply the shadow plugin https://github.com/johnrengelman/shadow However, so far I did not manage to get the shadow stuff to publish. |
https://gist.github.com/s1monw1/9bb3d817f31e22462ebdd1a567d8e78a#file-bintray-build-gradle-kts-L66 is working in a non multi-project build using the kotlin-DSL:
However, I do not get this to compile in my own project. This fails for me with:
|
@geoHeil, I recommend using following plugins (instead of the current Shipkit plugin): The new plugins are small and allow you to fully control the publications. The new plugins reflect our future direction for Shipkit Gradle plugins (https://github.com/mockito/shipkit/blob/master/docs/design-specs/future-shipkit.md). |
I could not find documentation how to release normal jar and fat jar at the same time. In my use case I would like to have one artifact as
com.github.magx2:some-library
and another with suffix-fat
,com.github.magx2:some-library-fat
.The text was updated successfully, but these errors were encountered: