How to import the jenkins-api in Groovy?
问题 I have a small groovy script that I want to edit and I have issues with the dependency management in Groovy. I am new to groovy and sorry in advance if this question is kinda studip / easy to answer. I use IntelliJ as IDEA. @Grab(group='org.jenkins-ci.main', module='jenkins-core', version='2.167', scope='provided') //import jenkins... def call() { Jenkins.instance.getItemByFullName(currentBuild.fullProjectName).getBuilds().each{ build -> if (currentBuild.number > build.number && exec != null)