I have a question how to resolve external dependencies for a Plugin.
I have a Custom Keyword named com.kazurayam.ksbackyard.ScreenshotDriver. This enables you to take full-page screenshots of web pages. Another post How to package Custom Keyword as Plugin showed us how to make a jar of custom keywords. Following this instruction, I could make a jar which contains the ScreenshotDriver class.
My ScreenshotDriver class depends on an external Java library aShot. How can I resolve the external dependency when I install the Plugin into another Katalon Project? Does Katalon 6.x.x resolves the dependencies to aShot automatically? Or do I have to download the jar of aShot from Maven Central and deploy it into the Drivers directory in into the project?
Then, a huge size of jar file was created. 6.8MB. It contained all of classes including Groovy, WebDriver etc. It seems that all of the class files in the project.configurations.compile are included in the jar. I do not think this is a favorable result.
It’s because AShot depends on Selenium, i.e Selenium is a transitive dependency. Since Katalon already contains Selenium, this dependency should be excluded.
Great news! We are looking forward to your awesome Keywords .
One minor point: this should be your namespace (com.kazurayam) so that AShot will be repackaged under com.kazurayam and will not clash with other plugins that use different versions of AShot.