Can a gradle variable used in dependencies section have a “-” dash/minus in them, It looks like if i have a variable with “-” gradle cannot resolve dependencies and fails in the build step.
A dash represents an arithmetic operator in Java (and Groovy). That’s why you can’t use it when defining variables usually. However, you could probably define the variable as extra property:
ext.'spring-version' = '3.0' println ext.'spring-version'
Using ‘ext’ when reading an extra property is problematic though. I would recommend to go with a simple and pragmatic solution, which is to use ‘_’ instead of ‘-’.
Thanks! i ended up using _.