I would like access classes I defined in groovy in my job dsl script files. I am unsure of how to do it and the repository does not have any examples.
My folder structure has src/jobs i.e the job dsl scripts and src/configs which contains Util.groovy.
Inside Util.groovy I have decleared package configs and defined a class Util. In my build.gradle I decleared resourceDir 'src/configs' in the jobDsl block.
I then tried importing Util.groovy with import configs.Util and import Util. Both result in error.
script: 1: unable to resolve class configs.Util
@ line 1, column 1.
import configs.Util
script: 1: unable to resolve class Util
@ line 1, column 1.
import Util
What would be the correct way to import my Util class?
Hello!
I would like access classes I defined in groovy in my job dsl script files. I am unsure of how to do it and the repository does not have any examples.
My folder structure has
src/jobs
i.e the job dsl scripts andsrc/configs
which containsUtil.groovy
. InsideUtil.groovy
I have declearedpackage configs
and defined a classUtil
. In mybuild.gradle
I declearedresourceDir 'src/configs'
in the jobDsl block.I then tried importing
Util.groovy
withimport configs.Util
andimport Util
. Both result in error.What would be the correct way to import my
Util
class?