# Dependencies Management with Native Gradle Support (P.o.C)

**URL:** <https://forum.katalon.com/t/dependencies-management-with-native-gradle-support-p-o-c/49406>\
**Category:** Miscellaneous\
**Tags:** new-doc-request\
**Created:** [November 20, 2020, 9:23am UTC](https://forum.katalon.com/t/dependencies-management-with-native-gradle-support-p-o-c/49406 "2020-11-20T09:23:24Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/katalon/original/3X/d/5/d55596ab02785a255798e87ede769734747b30c4.svg) [@system](https://forum.katalon.com/u/system)\
**Post date:** [November 20, 2020, 9:23am UTC](https://forum.katalon.com/t/dependencies-management-with-native-gradle-support-p-o-c/49406/1 "2020-11-20T09:23:24Z")

</div>

* * *
This is a companion discussion topic for the original entry at [https://docs.katalon.com/katalon-studio/docs/dependencies-management-gradle-support.html](https://docs.katalon.com/katalon-studio/docs/dependencies-management-gradle-support.html)

---

<div class="post-metadata">

**Author:** ![bdudek](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@bdudek](https://forum.katalon.com/u/bdudek)\
**Post date:** [January 26, 2021, 1:47pm UTC](https://forum.katalon.com/t/dependencies-management-with-native-gradle-support-p-o-c/49406/2 "2021-01-26T13:47:53Z")

</div>

How do I do this in Katalon version 7.9+ ?

---

<div class="post-metadata">

**Author:** ![Jass](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/jass/32/9588_2.png) [@Jass](https://forum.katalon.com/u/Jass)\
**Post date:** [January 29, 2021, 3:28am UTC](https://forum.katalon.com/t/dependencies-management-with-native-gradle-support-p-o-c/49406/3 "2021-01-29T03:28:15Z")

</div>

Hello

This feature is currently available as a P.o.C only and you can download it with the link provided in the document. Please be noted it’s not ready for production use.

Jass

---

<div class="post-metadata">

**Author:** ![bdudek](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@bdudek](https://forum.katalon.com/u/bdudek)\
**Post date:** [January 29, 2021, 2:51pm UTC](https://forum.katalon.com/t/dependencies-management-with-native-gradle-support-p-o-c/49406/4 "2021-01-29T14:51:57Z")

</div>

I see. I have to download [Katalon Studio v8.0.0.rc](https://github.com/katalon-studio/katalon-studio/releases/tag/v8.0.0.rc).  
Thanks!

---

<div class="post-metadata">

**Author:** ![bjhiltbrand](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/bjhiltbrand/32/16103_2.png) [@bjhiltbrand](https://forum.katalon.com/u/bjhiltbrand)\
**Post date:** [January 5, 2022, 11:02pm UTC](https://forum.katalon.com/t/dependencies-management-with-native-gradle-support-p-o-c/49406/5 "2022-01-05T23:02:06Z")

</div>

So, since we are now on version 8.2.0, and there is a build.gradle file in Katalon, how do I get the gradle plugin installed so that I can leverage the dependency management of the build.gradle file?

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [January 6, 2022, 1:35am UTC](https://forum.katalon.com/t/dependencies-management-with-native-gradle-support-p-o-c/49406/6 "2022-01-06T01:35:04Z")

</div>

I would show you how I use the dependency management of the build.gradle file in a Katalon Studio project.

1. I installed Gradle into my Mac. There are many ways to do that. I installed Gradle using Sdkman as [https://riptutorial.com/gradle/example/4351/installing-with-sdkman](https://riptutorial.com/gradle/example/4351/installing-with-sdkman)

2. I wrote a `build.gradle` file with a custom task named “`drivers`”, which downloads jars from the Maven Central repository, and copy the jars into the `Drivers` folder of my Katalon Studio project. For example, see the following code: [https://github.com/kazurayam/TestClosure/blob/develop/build.gradle](https://github.com/kazurayam/TestClosure/blob/develop/build.gradle)

```auto
task drivers {
    doFirst {
        delete fileTree("Drivers") {
            include("**/" + AUTO_IMPORTED_JAR_PREFIX + "*")
        }
    }
    doLast {
        copy { copySpec ->
            copySpec
                .from(project.getConfigurations().getByName("myconf"))
                .into("Drivers")
                .include(
                    "**/ashot*.jar",
                    "**/ashotwrapper*.jar",
                    "**/junit4ks*.jar",
                    "**/timekeeper*.jar",
                    "**/webdriverfactory*.jar"
                    )
                .rename({ s ->
                    AUTO_IMPORTED_JAR_PREFIX + s
                    })
        }
    }
}

```

1. I execute the task in the command line as:

```auto
$ cd $projectDir
$ gradle drivers

```

1. I get the external jars copied into the Drivers dir:

```auto
$ ls Drivers
AUTOIMPORTED_ashot-1.5.4.jar
AUTOIMPORTED_ashotwrapper-0.1.0.jar
AUTOIMPORTED_junit4ks-1.6.1.jar
AUTOIMPORTED_timekeeper-0.3.3.jar
AUTOIMPORTED_webdriverfactory-0.2.2-SNAPSHOT.jar

```

1. I will stop Katalon Studio and restart it so that it recognises the jars.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [January 6, 2022, 1:50am UTC](https://forum.katalon.com/t/dependencies-management-with-native-gradle-support-p-o-c/49406/7 "2022-01-06T01:50:41Z")

</div>

I use Gradle in the command line. I am a man who lives comfortably in the command line world. I use Gradle wherever I develop Java/Groovy projects in Emacs and IntelliJ IDEA, not only in Katalon Studio. I already know Gradle well. So I am not interested in Katalon GUI support for Gradle.

But a users who do not know Gradle at all may require GUI support by Katalon Studio; though I do not thinks there would not be many.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [January 6, 2022, 2:06am UTC](https://forum.katalon.com/t/dependencies-management-with-native-gradle-support-p-o-c/49406/8 "2022-01-06T02:06:22Z")

</div>

> [@kazurayam](#):
>
> So I am not interested in Katalon GUI support for Gradle.

What I would really dream about Katalon Studio is that Katalon Studio re-design its mechanism of dependency management entirely to be on the Maven style. The distributables (.zip, .dmg) of Katalon Studio simply bundles a lot of external dependencies (jars) but it does not offer users to utilize the Maven/Gradle’s dependency management for the top-level jars which are pre-installed in the distributables.

A problem arose at

> [@Studio 8.2.1.alpha is now available with Selenium 4!](http://forum.katalon.com/t/studio-8-2-1-alpha-is-now-available-with-selenium-4/61011/3):
>
> Selenium 4 supported Chrome DevTools Protocol. Chrome DevTools Protocol is also called CDP for short. See [this article](https://rahulshettyacademy.com/blog/index.php/2021/11/04/selenium-4-key-feature-network-interception/). I wanted to use CDP Network commands. For example, I wanted to fetch HTTP Request’s Headers (including Cookies) sent from Chrome to Web server. So I tried to write a Test Case that calls CDP through Selenium. In Katalon Studio v8.2.1-alpha, I wrote the following Test Case. This script is supposed to retrieve console logs in the DevTools. I copied this from [this article](https://www.qed42.com/insights/coe/quality-assurance/selenium-4-api-chrome-devtools) impor…

Katalon Studio v8.2.1-alpha bundled Selenium 4, but Katalon team did not bundled (intentionally, or just forgot it, i don’t know) some jars required by Selenium 4. I had a hard time to resolve the dependency for `org.seleniumhq.selenium:selenium-devtools-v96:4.1.1`.

If Katalon Studio is entirely based on the Maven/Gradle-like dependency management, then the dependency for `org.seleniumhq.selenium:selenium-devtools-v96:4.1.1` should be automatically resolved. However, in fact, it does not work like this.

Dependency management is a deep technical issue. It is not really a matter of GUI design.

---

<div class="post-metadata">

**Author:** ![bjhiltbrand](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/bjhiltbrand/32/16103_2.png) [@bjhiltbrand](https://forum.katalon.com/u/bjhiltbrand)\
**Post date:** [January 6, 2022, 3:05pm UTC](https://forum.katalon.com/t/dependencies-management-with-native-gradle-support-p-o-c/49406/9 "2022-01-06T15:05:25Z")

</div>

Thanks for this! It’s kind of annoying that the gradle plugin for eclipse (buildship) is not installed in Katalon studio, but the build.gradle file has been created. The plugin makes it trivial to be able to pull in new dependencies, simply by adding an entry to the dependencies section of the build.gradle file and then right clicking on the file and clicking the “gradle”-\>“refresh gradle project” option. I’m not afraid of the command line and doing it outside of Katalon Studio, but it would be so much easier for those on my team who aren’t as comfortable to have this integration.
