I have a huge keywords code base, most of it business logic. (From early on in the lifecycle of this project I have taken on last year, I have refactored the testspace from “manual mode” “low-code” bloat, to high-code-but-highly-effective code base that is heavy on “Custom Keywords” but modular af and easy to reason about.
This code base consist mostly of business logic (e.g. models, page classes, business-logic-specific utils inside the utils classes (e.g. stuff about NPI numbers inside SMDNumberUtils)), that, for obvious reason, I don’t want published into the exported SDK. However, there’s a small backbone of general WebUI utils, record handlers, base model list builders, base model factory class, benchmark utils, … that I do want to make publish core SDK out of.
How can I do so, creating this SDK as a child code project of my main project, and publish this child project to the Katalon Keyword Store…?
Are you trying to publish your jar file to the Maven Central repository?
If you want to do so, you have a lot more to learn and do. There are a lot of articles that tell you how to. For example, see Publish a Java Project to Maven Central with Gradle. I would warn you, it requires a lot of your efforts. And, if you just want to use your jar in another project, publishing your artifact to the Maven Central repository is not necessary .
All you need to do is to copy the jar from the source project’s build/libs directory into the target project’s Drivers folder.
At first, you can copy it manually, of course. Secondly, you can write some simple script to copy the file from the source to the target. Thirdly you can publish the jar into the local directory (so called “Maven Local repository”) which could be shared by multiple target projects on your local machine. You can write build.gradle of the target project so that it fetches the jar from the mavelLocal() repository. As far as you do not use the Maven Central repository, the com.katalon.gradle-plugin is of no use at all.
… do you understand? If not, please buy some good Gradle book and read it. It requires a lot of studies.
After some more careful thinking, it turns out that deploying the project to some central Maven repository is a YAGNI for right now…
I’ll look into the mavenLocal() stuff. I’m pretty sure I can write to some shared repository folder outside the project folder, and then instruct the target script to pull from there…
I’ma have to up my Gradle game. Writing code is the easy stuff in comparison…
The Maven Central repository is a public place to share java libraries unlimited. If you want to share your Java/Gradle libraries only with limited group of people, the Maven Central repository is not appropriate place to host your artifacts.
I often use “Maven Repository on GitHub Packages” instead of the Maven Central repository. See