Iām having a bit of trouble with the gradle shadow plugin
com.github.johnrengelman.shadow
Iām trying to create a fat JAR from various kotlin modules and my attempts to exclude transitive dependencies donāt seem to be working. My output JAR is truly fat at 820mb.
Iāve tried doing this, which is what I think I need:
dependencies {
implementation(project(":brainLib")) {
transitive = false
}
}
But I get the error:
Could not determine the dependencies of task ':brainLib:compileKotlinJvm'.
> Could not resolve all dependencies for configuration ':brainLib:jvmCompileClasspath'.
> Cannot change dependencies of dependency configuration ':brainLib:commonMainApi' after it has been included in dependency resolution.
I also tried this, which is supposed to be like a ākeepā rule in proguard, but that didnāt work either. (I think because the huge dependencies are transitive under brainLib).
shadowJar {
minimize {
exclude(project(":brainLib"))
}
}
Are there other suggestions as to what I could try?