Top "Groovy" questions

Groovy is an object-oriented programming language for the Java platform.

Loop through Map in Groovy?

I have a very simple task I am trying to do in Groovy but cannot seem to get it to …

dictionary groovy
How to get just the parent directory name of a specific file

How to get ddd from the path name where the test.java resides. File file = new File("C:/aaa/bbb/…

java groovy java-io
Jenkins: Cannot define variable in pipeline stage

I'm trying to create a declarative Jenkins pipeline script but having issues with simple variable declaration. Here is my script: …

jenkins groovy jenkins-pipeline
Is there a better way to write this null check, and a non-empty check, in groovy?

I need to perform a null/empty check on some code, before performing some logic. I have item below, because …

grails groovy
String concatenation with Groovy

What is the best (idiomatic) way to concatenate Strings in Groovy? Option 1: calculateAccountNumber(bank, branch, checkDigit, account) { bank + branch + checkDigit + …

string groovy idioms string-concatenation gstring
Get a list of all the files in a directory (recursive)

I'm trying to get (not print, that's easy) the list of files in a directory and its sub directories. I've …

file groovy directory-listing
How to access parameters in a Parameterized Build?

How do you access parameters set in the "This build is parameterized" section of a "Workflow" Jenkins job? TEST CASE …

jenkins groovy jenkins-pipeline
Scala vs. Groovy vs. Clojure

Can someone please explain the major differences between Scala, Groovy and Clojure. I know each of these compiles to run …

scala groovy clojure language-comparisons
Access to build environment variables from a groovy script in a Jenkins build step (Windows)

I'm using Scriptler plugin, so I can run a groovy script as a build step. My Jenkins slaves are running …

windows groovy jenkins environment-variables
Could not find method compile() for arguments Gradle

Looked around for this solution for much too long now, and I'm not sure if I missed it or just …

java groovy gradle