Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

copy release aar file after succeful build

when building an aar file using gradle, how can I copy the created release aar to some other directory ? (I do not want to change the default output dir just to copy the release file )

like image 394
jacob Avatar asked Feb 10 '23 11:02

jacob


1 Answers

Assuming you are not using any flavors, and you are not changing the AAR name, you can use something like the following task:

task copyAAR(type: Copy) {
    from('build/outputs/aar')
    into('/path/to/desired/output/dir')
    include(project.name + '-release.aar')
}

If you changed the AAR name, replace 'project.name' with that name.

like image 116
Daniel A. González Avatar answered Feb 15 '23 09:02

Daniel A. González