I store my keystore at my assets directory. How can exclude it in the build to create the .apk?
I tried in that way but still there:
android {
..
Try with next:
...
packagingOptions {
exclude 'META-INF/LICENSE.txt'
}
}
android.applicationVariants.all { variant ->
//if (variant.name.contains('Release')) { // exclude source and sourcemap from release builds
def rmkeystore = task("delete${variant.name}.rmkeystore", type: Delete) {
delete "${buildDir}/intermediates/assets/${variant.dirName}/keystore"
}
variant.mergeAssets.finalizedBy rmkeystore
//}
}
Ref: https://stackoverflow.com/a/29168827/717267