title: How to negate a variable in groovy
body: <p>I am trying to negate a variable using a groovy script but it does not seem to work using (!) , the variables are passed from a jenkins control running a groovy build flow:</p>
  
  <pre><code>def P = "arg"
  def resolver = build.buildVariableResolver
  def V = resolver.resolve(P)
   print "V is " + V
   print "negated V is " + !V
  </code></pre>
  
  <p>in both prints i get the same value!!</p>