Gradle Wrapper in Jenkins/Groovie Pipeline

Hi list,
I am trying to use gradle…wrapper in Groovie pipeline in Jenkins, what is the way of using gradle.wrapper in Groovie Pipeline in Jenkins?

Thanks in Advance

Hi Roger,

I guess for declarative pipeline something like this would work:

pipeline {
    agent any
    tools {
        jdk 'jdk8' 
    stages {
        stage('Example') {
            steps {
                sh './gradlew build'

That means running the gradle wrapper as a simple shell script. Does that work for you?