I am migrating from Maven3 to Gradle and I have an dependency on an internal project that includes some properties as version identifiers. When I try to compile my project, it complains about the dependency not found. The problem is these properties either use a period '.' or a dash '-' (e.g., cargo.version, supported-spring-version).
Is there a way in Groovy to declare a variable with odd characters?
def 'supported-spring-version' = '3.1.0.RELEASE'
You can't use def, but you can declare them in the current binding
this.'some-string' = '3'
println this.'some-string'
There's probably a better way round this though, but there's not enough information in your question to reliably suggest an alternative
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With