安卓编译后拷贝

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'
    }
}

你可能感兴趣的:(android,java,前端)