title: Error in import a class with constants in Jenkins Pipeline
body: <p>I'm following the method in <a href="https://stackoverflow.com/questions/63030857/how-to-import-a-class-with-constants-in-jenkins-pipeline">How to import a class with constants in Jenkins Pipeline?</a></p>
  <p>I use the similar code but got the error below:</p>
  <pre><code>WorkflowScript: 5: unable to resolve class ru.foo.bar.Const
   @ line 5, column 1.
     import ru.foo.bar.Const
     ^
  
  1 error
  
      at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
      at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:958)
      at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:605)
      at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:554)
      at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
      at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
      at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
      at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
      at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:133)
      at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:126)
      at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:561)
      at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:522)
      at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:320)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:429)
  </code></pre>
  <p>Code as below:</p>
  <p>src/ru/foo/bar/Const.groovy</p>
  <pre><code>package ru.foo.bar
  
  class Const {
      public static final String BITBUCKET_LOGIN = &quot;DEV_LOGIN&quot;
      public static final String BITBUCKET_PASS = &quot;DEV_PASS&quot;
  }
  return new Const()
  </code></pre>
  <pre><code>import ru.foo.bar.Const
  
  pipeline {
    stages {
      stage('init') {
        steps {
          script {
            println(&quot;${Const.BITBUCKET_LOGIN}&quot;)
          }
        }
  
      } /* 'ais refstack parallel builds' */
  }
  </code></pre>
  <p>Anything not correct in my usage?</p>