Skip to content

Instantly share code, notes, and snippets.

@mahdi-hosseinnion
Last active November 18, 2021 06:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mahdi-hosseinnion/a398bc9aedf77b872b4e47d5ed65cf99 to your computer and use it in GitHub Desktop.
Save mahdi-hosseinnion/a398bc9aedf77b872b4e47d5ed65cf99 to your computer and use it in GitHub Desktop.
some of command and codes thats may come handy in future
*run gradle with more info
Go to your Android project directory to execute the gradle command below:(in linux) windows = gradlew.bat
./gradlew assembleDebug --info
Note:If you have permission problems while executing the above command,you can use this to deal with it:
chmod +x gradlew
*gradle version infos
./gradlew --version
*clean project
./gradlew clean
*build project
./gradlew build
*build for debug package
./gradlew assembleDebug or ./gradlew aD
*build for release package
./gradlew assembleRelease or ./gradlew aR
*build for release package and install
./gradlew installRelease or ./gradlew iR Release
*build for debug package and install
./gradlew installDebug or ./gradlew iD Debug
*uninstall release package
./gradlew uninstallRelease or ./gradlew uR
*uninstall debug package
./gradlew uninstallDebug or ./gradlew uD
*all the above command + "--info" or "--debug" or "--scan" or "--stacktrace" can get more detail information
*rerun tasks
--rerun-tasks
*run test
./gradlew test
*run instrumental tests
./gradlew connectedAndroidTest
>>more info
https://developer.android.com/studio/test/command-line
https://docs.gradle.org/current/userguide/command_line_interface.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment