task makeCopyAAR(type: Copy, dependsOn: ['assembleRelease']){
from 'build/outputs/aar'
include '*.aar'
into "${rootProject.getBuildDir()}/outputs/apk/"
rename 'app-release.aar', 'Client.aar'
doLast {
println "makeCopyJar finished ${rootProject.getBuildDir()}/outputs/apk/"
}
}
tasks.whenTaskAdded { task ->
if (task.name == 'assembleRelease') {
task.finalizedBy 'makeCopyAAR'
}
}