Gradle Configuration
We use Gradle as a build tool. This page will help you configure Gradle for your plugin.
Mandatory configuration
The first thing you need to configure is the plugin name and the class package.
- Change in
settings.gradle
therootProject.name = 'plugin-template'
with your plugin name. - Change the class package: by default, the template provides a package
io.kestra.plugin.templates
, just rename the folder insrc/main/java
&src/test/java
- Change the package name on
build.gradle
: replacegroup "io.kestra.plugin.templates"
to the package name.
Now you can start developing your task or look at other optional gradle configuration.
Other configurations
Include some dependencies on plugins
You can add as many dependencies to your plugins, they will be isolated in the Kestra runtime. Thanks to this isolation, we ensure that two different versions of the same library will not clash and have runtime errors about missing methods.
The build.gradle
handle most of Kestra use case by default using compileOnly group: "io.kestra", name: "core", version: kestraVersion
for Kestra libs.
But if your plugin need some dependencies, you can add as many as you want that will be isolated, you just need to add api
dependencies:
api group: 'com.google.code.gson', name: 'gson', version: '2.8.6'
Was this page helpful?