Android Gradle - How to include assets from the root project?
<p>I have the following project structure</p>

<pre><code>MyProject
|-- build.gradle
|-- client.private
|-- server.public
|-- app
|   |-- build.gradle
|   |-- lint.xml
|   |-- proguard-project.txt
|   |-- project.properties
|   `-- src
</code></pre>

<p>and would like to include <code>client.private</code> and <code>server.public</code> files into the assets folder of the final apk but unfortunately not able to do so.</p>

<p>Have the following in my <code>app/build.gradle</code></p>

<pre><code>...
android {
    ...
    applicationVariants.all { variant -&gt;
        variant.mergeAssets.doLast {
            copy {
              from(['../client.private', '../server.public'])
              into("${buildDir}/assets/${variant.dirName}")
            }
        }
    }
}
</code></pre>

<p>but it only copies the files to <code>app/build/assets/debug</code>, its not packaged with the apk.</p>