How to define apk output directory when using gradle?

后端 未结 4 759
孤城傲影
孤城傲影 2020-12-08 08:07

How to define apk output directory when using gradle?

I would like to have possibility to upload apk to shared folder after each build.

4条回答
  •  轮回少年
    2020-12-08 08:33

    For Gradle version 2.2.1 +, you can do this:

    def outputPathName = "app/app-release.apk"
    applicationVariants.all { variant ->
            variant.outputs.each { output ->
                output.outputFile = new File(outputPathName)
            }
        }
    

提交回复
热议问题