gradle系统自带命令

gradlew tasks
Android tasks
-------------
//展示整个项目中的依赖(包括jar和aar)
androidDependencies - Displays the Android dependencies of the project.
//展示所有module的正式和测试的签名信息(MD5、SHA、SHA256)
signingReport - Displays the signing info for the base and test modules
//展示整个项目的源集
sourceSets - Prints out all the source sets defined in this project.

Build tasks
-----------
//输出所有的变体文件
assemble - Assemble main outputs for all the variants.
//输出AndroidTest变体
assembleAndroidTest - Assembles all the Test applications.
//输出Debug变体
assembleDebug - Assembles main outputs for all Debug variants.
//输出XXXXXX变体
assembleXXXXXX - Assembles main outputs for all XXXXXX variants.
//输出Release变体
assembleRelease - Assembles main outputs for all Release variants.
//编译当前项目
build - Assembles and tests this project.
//编译当前项目以及所有依赖他的项目
buildDependents - Assembles and tests this project and all projects that depend on it.
//编译当前项目以及所有他依赖的项目
buildNeeded - Assembles and tests this project and all projects it depends on.
//构造所有的bundle变体
bundle - Assemble bundles for all the variants.
//为Debug构造bundle变体
bundleDebug - Assembles bundles for all Debug variants.
//为XXXXXX构造bundle变体
bundleXXXXXX - Assembles bundles for all XXXXXX variants.
//为Release构造bundle变体
bundleRelease - Assembles bundles for all Release variants.
//清除所有的build文件
clean - Deletes the build directory.
//清除所有的build缓存文件(清除的比较少,具体也不知道清除了啥)
cleanBuildCache - Deletes the build cache directory.
//看解释好像是采集Debug版本的注解到文档中(但是我反复操作,没看到有生成任何文档,网上查了一下,涉及到的大部分都是碰到的错误说这个东西已经停止使用了)
extractDebugAnnotations - Extracts Android annotations for the debug variant into the archive file
//和上面同理
extractReleaseAnnotations - Extracts Android annotations for the release variant into the archive file

Build Setup tasks
-----------------
//初始化一个gradle项目(在命令行中直接跑起来就是会创建一个基于gradle的项目)
init - Initializes a new Gradle build.
//生成wrapper文件,便于多版本协作
wrapper - Generates Gradle wrapper files.

Cleanup tasks
-------------
//在所有的代码上跑一遍lint检查,并提出修改意见
lintFix - Runs lint on all variants and applies any safe suggestions to the source code.


Install tasks
-------------
//主要都是安装和卸载对应的构建变体
installDebugAndroidTest - Installs the android (on device) tests for the Debug build.
installXXXXXXDebug - Installs the DebugXXXXXX build.
installXXXXXXDebugAndroidTest - Installs the android (on device) tests for the XXXXXXDebug build.
installXXXXXXRelease - Installs the ReleaseXXXXXX build.
uninstallAll - Uninstall all applications.
uninstallDebugAndroidTest - Uninstalls the android (on device) tests for the Debug build.
uninstallXXXXXXDebug - Uninstalls the DebugXXXXXX build.
uninstallXXXXXXDebugAndroidTest - Uninstalls the android (on device) tests for the XXXXXXDebug build.
uninstallXXXXXXRelease - Uninstalls the ReleaseXXXXXX build.


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值