I applied the presented build.gradle file to my junit4ks project and successfully created the jar as follows:
$ ls -la build/libs
total 80
drwxr-xr-x 1 qcq0264 1049089 0 Mar 11 10:08 ./
drwxr-xr-x 1 qcq0264 1049089 0 Mar 13 13:00 ../
-rw-r--r-- 1 qcq0264 1049089 37888 Mar 11 09:45 junit4ks-all.jar
However, I would rather like to make the name of jar appeded with the version number, like
-rw-r--r-- 1 qcq0264 1049089 37888 Mar 11 09:45 junit4ks-all-0.16.0.jar
I would gladly write the version number in the build.gradle like
group="com.kazurayam"
version="0.16.0"
Writing the version number in build.gradle is a quite common exercise in Gradle I believe.
Adding the version number in the jar name requires modifying the katalonPluginPackage task, I believe. Please consider it.
================
I created junit4ks-all.jar
and posted it in my Github project’s Releases page. Now anybody can download the jar.
I downloaded junit4ks-all.jar
into the Drivers
directory of my another Katalon project webdriverfactory4ks. I mean, I would use the Keyword classes contained in the junit4ks-all.jar
just as one of the External libraries for Katalon Studio. I used junit4ks
keywords to do unit-test my Groovy classes in the webdriverfactory4ks
project using JUnit4. It just worked successfully.
This means, I could make my Custom Keywords packaged into a jar, publish it via Github, reuse it in another Katalon projects successfully.