Vahe Dandanyan
Vahe Dandanyan

Reputation: 57

Gradle: How to execute task after create lib.aar file?

I have gradle task which unbacks lib-debug.aar need execute this task after crate this lib-debug.aar file

task unzip<<{
    copy {
        def aarFile = file("${buildDir}/outputs/aar/lib-debug.aar")
        def outputDir = file("${buildDir}/outputs/eclipse")
        from zipTree(aarFile)
        into outputDir
    }

Upvotes: 2

Views: 1348

Answers (1)

Daniel A. Gonz&#225;lez
Daniel A. Gonz&#225;lez

Reputation: 1225

You can just do:

unzip.dependsOn assemble

That will make it so that whenever you run the unzip task, the assemble task has to have run before.

Upvotes: 2

Related Questions