Could not resolve $variable


#1

I’m getting this message:

Could not resolve: com.querydsl:querydsl-core:$querydslVersion

My script is something like:

ext {
	javaeeVersion = '7.0'
	querydslVersion = '4.1.4'
}

dependencies {
    providedCompile group: 'javax', name: 'javaee-api', version:'$javaeeVersion'
}

I’m using gradle 4.3.1.
Any ideas?


(Benjamin Muschko) #2

You are using single quotes '$javaeeVersion'. String interpolation in Groovy is only applied if you use double quotes. There’s also not point in using a String here at all. You can just say ..., version: javaeeVersion.