Gradle: Read properties from external file
<p>I have created a file <code>version.properties</code> in my Android project that contains this data:</p>

<pre><code>version.code=1
version.name="1.0.0"
</code></pre>

<p>And now I want to use this properties in <code>build.gradle</code> file this way:</p>

<pre><code>android {

    ...
    defaultConfig {
        ...
        versionCode project.property('version.code')
        versionName project.property('version.name')
    }
    ...
}
</code></pre>

<p>But, obviously, it doesn't find the properties. How can I add this file to classpath so that I can use its properties?</p>