Execution failed for task mockableAndroidJar, mockable-android- . jar already exists
Simply cleanup the existing jar before running the task again. Running clean
does work, but it's a little intense in my opinion. Instead, make the android-generated task depend on a very specific cleanup task:
task cleanAndroidMock(type: Delete) {
description = 'Deletes the mockable Android jar'
delete fileTree("${project.buildDir}/generated") {
include 'mockable-android*.jar'
}
}
project.afterEvaluate {
tasks['mockableAndroidJar'].dependsOn cleanAndroidMock
}