You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hyphen represents an arithmetic operator in Groovy. So you can't use ${spring-boot-version} to read value of property with a key spring-boot-version. But you can read the value using property() method: compile "org.springframework.boot:spring-boot-starter-jdbc:${property('spring-boot-version')}"
Here https://discuss.gradle.org/t/trying-to-define-global-ext-properties-version-for-dependencies/11159/2 you can find more info about variables with 'dot' in name (similar case to hyphen in name) and ways to define them. But probably the simplest solution is to use variable names without hyphens (with _ instead of - (3,221 code results at GitHub) or using camel case(47,415 code results at Gitub)).
These extra spaces added around hyphens is not a bug in 'Gradle dependencies formatter' plugin. It's a feature of IntelliJ Groovy plugin ;-) If you paste
Oh good catch. I didn't notice this because I was just removing those variables in the gradle file, my bad! And thanks again for looking into these issues, this plugin is super helpful!
Reported by @banana-ben in #3 (comment):
hyphens in Maven variable names get pasted with spaces surrounding them in the Gradle dependency, ie:
becomes
compile "org.springframework.boot:spring-boot-starter-jdbc:${spring - boot - version}"
The text was updated successfully, but these errors were encountered: