Following up on my previous question about a System Groovy Script.
I have a .groovy file in a git repo.
I have cloned the git repo to my pc.
I have opened the directory in IntelliJ IDEA.
Now I get a lot of red text. None of the imports are found.
It looks like this:
import hudson.model.*;
import hudson.util.*;
import jenkins.model.*;
import hudson.FilePath.FileCallable;
import hudson.slaves.OfflineCause;
import hudson.node_monitors.*;
import org.jenkinsci.plugins.workflow.job.WorkflowRun
import org.jenkinsci.plugins.workflow.flow.FlowExecution;
import org.jenkinsci.plugins.workflow.graph.FlowGraphWalker;
import org.jenkinsci.plugins.workflow.graph.FlowNode;
import org.jenkinsci.plugins.workflow.graph.StepStartNode;
import org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode;
import org.jenkinsci.plugins.workflow.actions.WorkspaceAction
How do I configure IntelliJ IDEA so that I no longer have red alerts on the imports?
For the record: I did not write this code. I have been asked to maintain it, and fix a bug.
It's my professional opinion that all code should be under version control, and I don't want to edit the code directly on the Jenkins web pages but in a IDE so that I have syntax checking, autocomplete, and all the other usual conveniences.
You are allowed to assume that there are only 3 files in the repository: a .groovy file, a .gitattributes and a .gitignore. I do know how to write code in the Groovy language, but I don't know how to set up a Groovy project. As an analogy: I know how to fly a plane, but I don't know how to take off or land.