Locating output when building an Android project using Gradle via terminal?

I am trying to automate the process of building and downloading a signed APK for Android without using Android Studio, so I run everything in the terminal. First command:

./gradlew assembleRelease

Which generates an unsigned, non-primary APK in the / APP NAME / build / output / apk folder. However, since APP NAME will not be the same for each application, I can’t just hard-fix the location of the output file in the next step of signing it. Are there any arguments that I can use with the gradlew command to specify the output directory and file name of my choice?

+4
source share
1 answer

There is no such command to indicate output. But you can write a script to make this possible. When you have it /build/outputs/app-release.apk, you can copy and rename it wherever you want.

+2
source

Source: https://habr.com/ru/post/1570524/


All Articles