Using variables in Gradle build script : <p>I am using Gradle in my project. I have a task for doing some extra configuration with my war. I need to build a string to use in my task like, lets say I have:</p>

<pre><code>task extraStuff{
    doStuff 'org.springframework:spring-web:3.0.6.RELEASE@war'
}
</code></pre>

<p>This works fine. What I need to do is define version (actually already defined in properties file) and use this in the task like:</p>

<pre><code>springVersion=3.0.6.RELEASE

task extraStuff{
    doStuff 'org.springframework:spring-web:${springVersion}@war'
}
</code></pre>

<p>My problem is spring version is not recognised as variable. So how can I pass it inside the string?</p>
