Q:

Gradle copy file from resources to assets on compilation

I am looking for a way to copy src/main/res/values/* to /src/main/assets/www/xml/
I would like this to happen on compile, so I've been trying to get gradle to do such a thing, but with no success. 
I appreciate any help with this :)
I have added my current gradle file:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 21
    buildToolsVersion '22.0.1'

    defaultConfig {
        applicationId "name"
        minSdkVersion 1
        targetSdkVersion 21
        versionCode 123
        versionName "123"
    }
}

dependencies {
    A huge bunch
}

Based on the copy task given from Enrico I made this work:
task myCopy(type: Copy) {
    from 'src/main/res/values'
    into 'src/main/assets/www/xml'
}

project.afterEvaluate {
    prepareDebugDependencies.dependsOn myCopy
}

A:

Create a copy task and make it a dependency of the compile task
task myCopy(type: Copy) {
    from 'src/main/res/values'
    into 'src/main/assets/www/xml'
}
assemble.dependsOn myCopy

EDIT: I assumed you had a compile task.  Use assemble instead

