Gradle Common Commands

Source: Internet
Author: User

gradle Common Commands


1. Gragle Common Commands

Before touching some of the commands such as

./Gradlew -V

./Gradlew Clean

./Gradlew Build,


Note that all are ./gradlew, ./ represents the current directory, Gradlew represents Gradle wrapper, which means a layer of gradle packaging, It can be understood that Gradle is encapsulated locally in this project, that is, Gradle wrapper, as long as the download is successful, the Grdlew wrapper command instead of the Global gradle command.

Understanding the concept of Gradle wrapper, here are some common commands:
    • ./gradlew-v Version Number
    • ./gradlew Clean Clear .../app directory under the Build folder
    • ./gradlew build check dependencies and compile package


Note here that the./gradlew build command to the debug, Release environment package all out, if the official release only need to hit release package, what to do, the following is a very useful command **assemble**, such as

    • ./gradlew Assembledebug compiles and hits the debug package
    • ./gradlew Assemblerelease compiling and playing the release package
    • ./gradlew installrelease Release mode package and install
    • ./gradlew Uninstallrelease Uninstall Release Mode pack


Second, attached: Build structure directory

Tree

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 66676869707172737475767778798081828384858687888990
build/├──apk├──assets│├──debug│└──Release├──classes│├──debug││└──com││└──example││└──gradle│└──Release│└──com│└──example│└──gradle├──dependency-cache│├──debug│└──Release├──incremental│├──aidl││├──debug││└──Release│├──dex││├──debug││└──Release│├──mergeassets││├──debug││└──Release│└──mergeresources│├──debug│└──Release├──libs├──manifests│├──debug│└──Release├──res│├── All││├──debug│││├──drawable-hdpi│││├──drawable-mdpi│││├──drawable-xhdpi│││├──d    Rawable-xxhdpi│││├──layout│││├──menu│││├──values│││├──values-sw720dp-land│││ ├──values-v11│││└──values-v14││└──Release││├──drawable-hdpi││├──drawable-mdpi││├──drawable-xhdpi││├──drawable-xxhdpi│ │├──layout││├──menu││├──values││├──values-sw720dp-land││├──values-v11 ││└──values-v14│└──rs│├──debug│└──Release├──source│├──aidl││├──debug││└──Release│├──buildconfig││├──debug│││└──com│││└──example│││└──gradle││└─ -Release││└──com││└──example││└──gradle│├──r││├──debug│││└──com│ ││└──example│││└──gradle││└──Release││└──com││└──example││└──gradle│└──rs│├──debug│└──Release└──symbols├──debug└──ReleaseDirectories




Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Gradle Common Commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.