Groovy in apply from: scripts

If I do

println '${project.projectDir}'

in my build.gradle file, I get the replaced output (i.e. /home/user/project) as intended. However, If I have in my build.gradle file:

apply from: 'myFile.gradle'

and then in myFile.gradle if I have:

println '${project.projectDir}'

I get “${project.projectDir}” as the output string (which is a bit scary that I got that). Can someone tell me how I might get the original Groovy-like behavior when I use apply from?

Groovy only supports String interpolation for double-quoted String literals.