So far I have added the following to the end of my \"build.gradle\"
task copyFiles(type: Copy)
copyFiles {
description = \'Copies html5 files from the c
Try this below your build.gradle
:
tasks.whenTaskAdded { task ->
if (task.name == 'assemble') {
task.dependsOn copyFiles
}
}
In my case I manipulate some 'token' values inside res/values/strings.xml
, and then copy it into ${project_root}/build/filtered-resources
due to project cleaning issue.
To work correctly with this manipulated resource, android.sourceSets.res
should be redefined to copied folder.
For your case copy assets
folder with your www
resource into ${PROJECT_ROOT}/build/your/desired/location
, and asign android.sourceSets.assets
point to it.