mrkuz / kradle

Swiss army knife for Kotlin/JVM (and also Java) development
MIT License
83 stars 2 forks source link

Dynamic dependencies possible? #2

Closed GavinRay97 closed 2 years ago

GavinRay97 commented 2 years ago

I'm curious whether it's possible for the plugin to optionally include dependencies, depending on the enabled status of a feature

Possibly useful:

mrkuz commented 2 years ago

Hi!

The plugin uses dynamic dependencies internally, but currently there is no way to add you own.

Can you provide a kradle-specific use case and/or a pseudo build.gradle how you would like to see this feature implemented?

GavinRay97 commented 2 years ago

Ah, I just meant whether or not it knew to exclude IE jmh if the benchmarking feature was not enabled

It sounds like that may be the case -- if so, I can close this!

mrkuz commented 2 years ago

Yes, this is the case. The dependencies are only added if required (you can check with gradle dependencies).

Also, test and benchmark dependencies are in their own dependency configurations. This ensures they are not part of the runtime classpath or the uber jar.