Building components with Gradle

To develop new components, Talend Component Kit requires a build tool in which you will import the component project generated from the starter. With this build tool, you will also be able to implement the logic of your component and to install and deploy it to Talend applications. A Talend Component Kit plugin is available for each of the supported build tools.

gradle-talend-component helps you write components that match the best practices. It is inspired from the Maven plugin and adds the ability to generate automatically the dependencies.txt file used by the SDK to build the component classpath. For more information on the configuration, refer to the Maven properties matching the attributes.

By default, Gradle does not log information messages. To see messages, use --info in your commands. Refer to Gradle’s documentation to learn about log levels.

You can use it as follows:

buildscript {
  repositories {
    mavenLocal()
    mavenCentral()
  }
  dependencies {
    classpath "org.talend.sdk.component:gradle-talend-component:${talendComponentVersion}"
  }
}

apply plugin: 'org.talend.sdk.component'
apply plugin: 'java'

// optional customization
talendComponentKit {
    // dependencies.txt generation, replaces maven-dependency-plugin
    dependenciesLocation = "TALEND-INF/dependencies.txt"
    boolean skipDependenciesFile = false;

    // classpath for validation utilities
    sdkVersion = "${talendComponentVersion}"
    apiVersion = "${talendComponentApiVersion}"

    // documentation
    skipDocumentation = false
    documentationOutput = new File(....)
    documentationLevel = 2 // first level will be == in the generated .adoc
    documentationTitle = 'My Component Family' // defaults to ${project.name}
    documentationAttributes = [:] // adoc attributes
    documentationFormats = [:] // renderings to do
    documentationVersion = 1.1 // defaults to the .pom version

    // validation
    skipValidation = false
    validateFamily = true
    validateSerializable = true
    validateInternationalization = true
    validateModel = true
    validateOptionNames = true
    validateMetadata = true
    validateComponent = true
    validateDataStore = true
    validateDataSet = true
    validateActions = true
    validateLocalConfiguration = true
    validateOutputConnection = true
    validateLayout = true
    validateDocumentation = true

    // web
    serverArguments = []
    serverPort = 8080

    // car
    carAttach = true
    carClassifier = component // classifier to use if carAttach is set to true
    carOutput = new File(....)
    carMetadata = [:] // custom meta (string key-value pairs)
    carPackaging = ${project.packaging}

    // deploy-in-studio
    studioHome = "C:\<pathToSutdio>"
}
Scroll to top