Reputation: 8220
I have a file pipeline.gdsl
that contains the Syntax for my Jenkins Pipeline DSL. Following this blog post I put the file into the /src
folder of my Java project. When I now edit my Jenkinsfile
(residing in the root folder of my project), I don't get any code completion / syntax explanation as I would expect.
My project is a Java / Gradle project and I cannot make a Groovy project out of it. Is there some other way to make IntelliJ aware of the .gdsl
file and provide code completion?
Upvotes: 36
Views: 22124
Reputation: 8220
The problem was, that /src
was not marked as a source root folder in my project. Creating a folder /src/main/groovy
, putting the file in there and marking it as a sources root (right click on the folder -> Mark directory as -> Sources Root) did the trick.
Upvotes: 32