Hi everyone, I am working with a local jfrog artif...
# getting-started
m
Hi everyone, I am working with a local jfrog artifactory and I made build.gradle.kts file and followed how to configure it to integrate with the local repo, now I heared that the shadow plugin is good for making fat jars also in kotlin so I decided to use it, I wrote the following line inside my dependencies block: compile("shadowshadow1.2.3") and it did pulled it from the local repo (can see the jar inside "external libraries" in intellij) but when I am trying to include the shadow plugin the build failed because it cannot find the shadow plugin which is very strange. Anyone have any idea how to add the shadow plugin properly?
m
Not really a Kotlin question. This is a Gradle/Artifactory issue. Quick answer. If you're only referring to a local Artifactory, and you don't have any virtual repos referencing jcentre/maven central, then you will have to download the shadow files and upload them to your local artifactory.
m
I did downloaded the jar and deployed it to the local artifactory, as I said, it did appears at 'External Libraries' in intellij idea, problem is that the Gradle still can't find it and use the ShadowPlugin
m
Ahh, sorry. Just saw. Isn't shadow a gradle plugin? So depending on your build, you'd add it to
plugins
or
buildscript
. But I'm not familiar with specific config of Shadow plugin.
m
I've tried to add the plugin inside the plugins block but it comes up with an error: "Unresolved reference 'ShadowPlugin'" (even tried with the full path of com.github etc..)
m
For plugins, Gradle won't look at the local Artifactory unless you explicitly tell it to. That is controlled by the PluginManagement block that gets defined in settings.gradle (or settings.kts.gradle). And I'd suggest double checking the docs of the Shadow plugin. If that fails, then I think it's time to reach out to Gradle/Artifactory/Shadow plugin people for support.