Can I modify the perforce credential with jenkins groovy script?
<p>I am using the newer "p4" <a href="https://wiki.jenkins-ci.org/display/JENKINS/P4+Plugin" rel="nofollow">perforce plugin</a> and I have a couple dozen jobs.  I need to now change the Perforce credentials.  The following groovy script (run in Script Console) will print them out, but the "credential" field in <a href="https://github.com/jenkinsci/p4-plugin/blob/master/src/main/java/org/jenkinsci/plugins/p4/PerforceScm.java" rel="nofollow">PerforceScm.java</a> is final so I can't modify it.  Is there a way to update this configuration?</p>

<pre><code>projects = Hudson.instance.projects
projects.each(proj -&gt;
    println(scm.credential)
}
</code></pre>

<p>I feel there must be some configuration item used to construct a PerforceScm object.  E.g. there is a descriptor, available using "scm.getDescriptor()", that has a credential field.  But that field is null when I print it.</p>