Gradle: Exclude file from Android assets folder
I run into the same problem and it seems adding a "!" works to indicate the file should be excluded:
aaptOptions {
ignoreAssetsPattern "!myfile.txt"
}
"assets.exclude" might work also by adding a "!" but I haven't tested it...
I think this should do what you want:
android {
aaptOptions {
ignoreAssetsPattern "myfile.txt"
}
}
Source: http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-aapt-options