1

In class

class Variable{
   String name
   def value
}

When I do it in eclipse works fine...

Variable variable = new Variable(name:"A",value:3)

But, when I do gradle build, compiler ignores value parameter for constructor and my tests fail.

To work, I need:

Variable variable = new Variable(name:"A")
variable.value = 3

Somebody have got this situation yet?

Anderson Lira
  • 338
  • 3
  • 9

1 Answers1

0

Trouble was neither groovy nor gradle.
Trouble was grails, that not bind transients fields in constructor.
My question was not complete. Sorry. Thanks Mikelis Baltruks for your help.

To solve, I found this link

Community
  • 1
  • 1
Anderson Lira
  • 338
  • 3
  • 9
  • then you should either accept your own answer or delete this post, so it doesn't "hang" in the air unanswered. btw - I just [more carefully] read your question again. missed most of the specifics when first commented. :D – Mike B Sep 12 '16 at 18:01
  • Thanks. But I cant accept as correct yet. I must wait 2 days. ;D Obrigado. – Anderson Lira Sep 12 '16 at 18:34