How Do We Introduce A Gradle Property?

See the following build.gradle has a missing property "spring_boot_version"

repositories {
mavenCentral()
}

dependencies {
compile("org.springframework.boot:spring-boot-starter-websocket:$spring_boot_version") {
}
}

IDEA doesn't highlight this as an error and there is no useful fix to either add it in a properties file or define it use ext.

 

 

1
3 comments

Hi, In such case IDEA shows "can not resolve symbol" tooltip, pressing Alt+Enter or a lightbulb icon shows a contest menu to create a variable.

0

It probably should be an error instead of warning.

This is what pops u in the context menu which is quite confusing:

And Create Variable creates this which isn't the way that people tend to use variables in their dependency blocks.

def spring_boot_version


0

Please sign in to leave a comment.