When i run gradle katalonPluginPackage, then got an error as Task 'katalonPluginPackage' not found in root project '<Username>'

Hello,

 I want to create a keyword plug using gradle, I follow all the step according to Katalon dec. 

but when I run the command “gradle katalonPluginPackage” it show me an error message as - “Task ‘katalonPluginPackage’ not found in root project ‘’.”
I search on google it show me link - Gradle - Plugin: com.katalon.gradle-plugin

but does not understand what actually error.
Please help how to resolved gradle issue.

Thanks
Jayesh

Hi @jayeshpansare,

The katalonPluginPackage task needs to be run in a KS project. Please follow the instruction: How to develop Custom Keywords Plugins

  1. Create or open a Katalon project using Katalon Studio
  2. Create bulid.gradle file with this template:
plugins {
  id 'java'
  id 'groovy'
  id 'com.github.johnrengelman.shadow' version '4.0.4'
  id "com.katalon.gradle-plugin" version "0.0.6"
}

repositories {
  jcenter()
  mavenCentral()
}

sourceSets {
  main {
    groovy {
      srcDirs = ['Keywords', 'Include/scripts/groovy']
      srcDir 'Libs'
    }
  }
}
  1. Run gradle katalonPluginPackage command under the created project

Thanks

2 Likes

Thanks @duyluong, It work now…

1 Like

Hello, I create my own keyword plugin. But how to test that plugin.

According to doc. I follow Following steps:

  1. Create new project in katalon.
  2. Pest Plugin in Plugins folder.
  3. Close the katalon and reopen it.

But nothing happen, even it can’t import kayords files.
Please help me to test keyword plugin.

Thanks
Jayesh


Hi @jayeshpansare,

KS allows only one dev plugin in Plugins, please remove the unnecessary one.
KS recognizes your custom keyword class files after reading katalon-plugin.son file. Please create your katalon-plugin.json files following this template the rebuild again.

Thanks.

Hello,

Please help…

How to rebuild keywords plugin in KS. Can you send me steps or cmd?
I am not familiar with Gradle.

I create katalon-plugin.son file in keywords folder and build.gradle file in main folder.
Run the some cmd

Path to folder Name/ gradle testAPI
Path to folder Name/ gradle rebuild
Path to folder Name/ gradle rebuild KYM_API_Testing
Path to folder Name/plugin/ gradle KYM_API_Testing
Path to folder Name/ gradle katalonListTestSuites

and many more.
but it can’t extract the plugin jar file.

Thanks
Jayesh

What was the error? It seems that you have packaged your plugin successfully as stated in previous posts.

Thanks for replay… but I want to repack (Extract) groovy file form .jar (KYM_API_Testing.jar) file. and it will be repack in Keywords folder (I think so this will happen in KS).