Endre Deak
06/03/2022, 3:34 PMdistribution
plugin? I have a service which has a part which generates some kotlin code from a yaml file (using snakeyaml
). But that’s only used manually by developers and isn’t required runtime. Yet, their dependencies defined compileOnly
still appear in build/install/service/lib
folder. I’ve tried to exlcude them by
application {
applicationdistribution.exclude("snakeyaml*.jar)
}
but that kept the jar in the lib folder.
I wonder what’s the right way to isolate these sub-distributions and include only the required dependencies.Vampire
06/03/2022, 3:39 PMdistribution
plugin with the application
plugin. The latter applies the former and creates and configures a distribution for it.
If the dependencies are compileOnly
, they will not land in .../lib/
unless you intentionally did something to achieve that. I suspect you also have snakeyaml as transitive dependency.
You should use the dependencyInsight
task or a build scan to find out where it comes from.