概述

命令学习比较枯燥,全部是例子~

gradle版本

假设你的本地gradle已经安装配置完成。没有安装配置的,可以参考 gradle安装

C:\Users\yueling.DANGDANG>gradle -v

------------------------------------------------------------
Gradle 4.5.1
------------------------------------------------------------ Build time: 2018-02-05 13:22:49 UTC
Revision: 37007e1c012001ff09973e0bd095139239ecd3b3 Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM: 1.8.0_73 (Oracle Corporation 25.73-b02)
OS: Windows 7 6.1 amd64 C:\Users\yueling.DANGDANG>

语法

gradle [taskName...] [--option-name...]

gradlew是包装器,自动下载包装里定义好的gradle 版本,保证编译环境统一,gradle 是用本地的gradle。所以./gradlew、gradle通用,不神秘,使用更方便一些,可以使用gradle互相替换。其中gradlew的内容可以在项目的目录下查看。

  • 任务

    如果需要处理多任务,任务列表必须使用空格分割开,如
gradle test deploy
  • 选项

    选项可以放在任务列表前也可以放在任务列表后,如下的写法作用是相同的
gradle --console=plain test
gradle test --console=plain

记忆技巧:长格式的选项 表示启用特性的都具有反向操作(关闭特性),关闭特性长选项格式在启用特性前缀no-

--build-cache
--configure-on-demand
--daemon
--parallel
--scan --no-build-cache
--no-configure-on-demand
--no-daemon
--no-parallel
--no-scan

命令列表

打开控制台,

command_Parameters introduction
-?, -h, –help 展示帮助信息
-a, –no-rebuild 忽略构建”项目依赖”,[废弃]
-b, –build-file 使用用-b参数将会忽略setting文件,用指定的.gradle文件进行构建(默认情况下首先会寻找当前目录下的 build.gradle文件或依据settings.gradle中的配置寻找子项目中的build.gradle)
–build-cache 支持gradle缓存。Gradle将试图重用以前的版本的输出
-c, –settings-file 执行指定的*.gralde文件(默认settings.gradle)
–configure-on-demand 配置必要的项目。Gradle将试图减少大型多项目构建的配置时间
–console 指定控制台输出类型,可选值有’plain’、’auto’(默认)、’rich’、’verbose’。plain 是生成普通的文本,该选项禁止所有颜色和富文本输出;auto当构建程序与控制台相关联时启动颜色和富文本输出,或者不关联时生成普通文本;rich 启动颜色和富文本输出,忽略构建程序是否关联了控制台,如果没有关联构建输出将输出 ANSI 控制字符来生产富文本输出;verbose会输出更多的详细信息(感觉很乱,调试问题可能会用到)
–continue 构建时遇到错误忽略报错,继续构建,默认报错后终止构建
-D, –system-prop -D属性会被传送给启动Gradle的jvm,作为一个系统属性被jvm使用(例如:-Dmyprop=myvalue)
-d, –debug 指定日志输出级别为debug,可打印一般堆栈信息
–daemon 使用Gradle守护进程执行构建,如果没有守护进程则启动一个守护进程
–foreground 以foreground形式启动守护进程
-g, –gradle-user-home 指定默认的指定Gradle 用户home目录.默认在”用户目录/.gradle”
-I, –init-script 运行指定初始化脚本,脚本会在build之前执行.查找init.gradle的路径顺序:./,USER_HOME/.gradle/ ,USER_HOME/.gradle/init.d/,GRADLE_HOME/init.d/
-i, –info 指定日志级别为info
–include-build 在组合中包含指定的构建
-m, –dry-run 模拟任务执行过程并将过程打印出来,并非真正执行,目的是展示执行的过程
–max-workers 设定参与构建的cpu的核数
–no-build-cache 禁用构建缓存
–no-configure-on-demand 根据需要禁用配置
–no-daemon 禁用守护进程,不使用守护进程执行构建. 如果你已经配置了Gradle总会使用守护进程运行,此选项有帮助
–no-parallel 禁止使用并行模式构建项目
–no-scan 禁用创建构建扫描,更多信息可以参考https://gradle.com/build-scans
–offline 采用离线模式构建项目,不使用网路资源(此时很有可能出现构建失败的情况慎用)
-P, –project-prop 设置Gradle的项目参数,会被直接加载到Gradle领域对象上(例如:-Pmyprop=myvalue)
-p, –project-dir 为gradle指定起始目录。默认为当前目录
–parallel 采用并行模式构建。gradle采用配置的线程数进行构建
–profile 存储一份执行报告到<build_dir>/reports/profile,包括总时间和在配置和任务执行阶段的细节。并以时间大小倒序排列,并且记录了任务的执行情况.Gradle会根据构建时间命名这些报告文件
–project-cache-dir 指定项目的缓存目录。默认在项目目录中。
-q, –quiet 静默方式,只输出error信息
–recompile-scripts 强制构建脚本重新编译[废弃]
–refresh-dependencies 刷新依赖的状态
–rerun-tasks 忽略先前缓存的任务结果
-S, –full-stacktrace 打印全部详细信息,所有异常的堆栈信息
-s, –stacktrace 打印所有异常的堆栈信息
–scan 创建一个构建扫描。如果构建扫描插件没有被应用,那么gradle会发出警告(https://gradle.com/build-scans)
–status 统计信息,展示正在运行和最近停止的gradle进程
–stop 如果守护进程正在运行,停止gradle的守护进程
-t, –continuous 连续构建模式,采用此模式后会监听所有构建文件变化,文件发生变化后会自动重新构建
-u, –no-search-upward 不使用父目录中的settings.gradle文件,如果不添加此项,父目录的setting.gradle会覆盖子目录下的配置
-v, –version 打印gradle版本信息
-w, –warn 指定日志级别为warn
–warning-mode 指定要生成的警告模式。值是’all’, ‘summary’(默认) or ‘no’
-x, –exclude-task 任务排除,跳过执行指定任务

命令的一些用法

准备一个项目

使用eclipse创建一个gradle的项目:gradleDemo

该项目不写任何代码,只配置build.gradle,只为了演示命令的基本用法及效果

build.gradle

apply plugin: 'java-library'

// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
} dependencies {
// This dependency is exported to consumers, that is to say found on their compile classpath.
api 'org.apache.commons:commons-math3:3.6.1' // This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation 'com.google.guava:guava:23.0' // Use JUnit test framework
testImplementation 'junit:junit:4.12'
} //有依赖
task base {
doLast {
println "i'm base!"
}
}
task extend(dependsOn: base) {
doLast {
println "I'm extend!"
}
}
//使用<<代替dolast
task dolast <<{
println "show me! dolast"
println ("show me! dolast")
println ("show me! dolast");
}
//多字节名称使用间歇eEE
task extendExpExp() {
doLast {
println "I'm extendExpExp"
}
}

实验

挑一些常用的命令用实例说明用法,首先切换到项目所在目录

Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。 C:\Users\yueling.DANGDANG>cd /d d:\eclipsWS\gradleWS\gradleDemo d:\eclipsWS\gradleWS\gradleDemo>
  • 直接执行命令
d:\eclipsWS\gradleWS\gradleDemo>gradle
:help Welcome to Gradle 4.5.1. To run a build, run gradle <task> ... To see a list of available tasks, run gradle tasks To see a list of command-line options, run gradle --help To see more detail about a task, run gradle help --task <task> Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.5.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
  • 执行任务和任务的所有依赖
d:\eclipsWS\gradleWS\gradleDemo>gradle extend
:base
i'm base!
:extend
I'm extend! Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.5.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 0s
2 actionable tasks: 2 executed

多模块项目中,可以在root项目中指定项目名称来执行,此项目时单模块的,不在此演示,格式为 gradle projectName:taskName

  • 多任务执行
d:\eclipsWS\gradleWS\gradleDemo>gradle base dolast
:base
i'm base!
:dolast
show me! dolast
show me! dolast
show me! dolast Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.5.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 0s
2 actionable tasks: 2 executed
  • 排除模块执行
d:\eclipsWS\gradleWS\gradleDemo>gradle base dolast -x dolast
:base
i'm base! Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.5.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 0s
1 actionable task: 1 executed
>
  • 强制执行任务
d:\eclipsWS\gradleWS\gradleDemo>gradle base --rerun-tasks
:base
i'm base! Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.5.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
  • 遇到错误继续执行
d:\eclipsWS\gradleWS\gradleDemo>gradle base --continue
:base
i'm base! Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.5.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 0s
1 actionable task: 1 executed

当然目前该项目没有错误^_^

  • task控制 doFirst 和doLast

    在这里我们使用它来控制一些输出作为演示(实际项目中可以填入更复杂的actions),前面的例子中已经使用了,还可以更灵活第控制,如在build.gradle中配置添加
base.doLast {
println "addtion end......"
}
base.doFirst {
println "addtion start......"
}

那么输入就会改变,在任务开始和结束打印的内容随之变化

d:\eclipsWS\gradleWS\gradleDemo>gradle base
:base
addtion start......
i'm base!
addtion end...... Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.5.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
  • 静默构建

    多余的日志信息不见了~~~
d:\eclipsWS\gradleWS\gradleDemo>gradle -q base
addtion start......
i'm base!
addtion end......
d:\eclipsWS\gradleWS\gradleDemo>
  • 设置日志级别

    分别演示了设置成warn和info的情况
d:\eclipsWS\gradleWS\gradleDemo>gradle -w base
addtion start......
i'm base!
addtion end...... Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.5.1/userguide/command_line_interface.html#sec:command_line_warnings
d:\eclipsWS\gradleWS\gradleDemo>gradle -i base
Initialized native services in: C:\Users\yueling.DANGDANG\.gradle\native
The client will now receive all logging from the daemon (pid: 59652). The daemon log file: C:\Users\yueling.DANGDANG\.gradle\daemon\4.5.1\daemon-59652.out.log
Starting 33rd build in daemon [uptime: 3 hrs 53 mins 31.583 secs, performance: 100%, no major garbage collections]
Using 4 worker leases.
Starting Build
Settings evaluated using settings file 'D:\eclipsWS\gradleWS\gradleDemo\settings.gradle'.
Projects loaded. Root project using build file 'D:\eclipsWS\gradleWS\gradleDemo\build.gradle'.
Included projects: [root project 'gradleDemo']
Evaluating root project 'gradleDemo' using build file 'D:\eclipsWS\gradleWS\gradleDemo\build.gradle'.
All projects evaluated.
Selected primary task 'base' from project :
Tasks to be executed: [task ':base']
:base (Thread[Daemon worker Thread 17,5,main]) started.
:base
Task ':base' is not up-to-date because:
Task has not declared any outputs.
addtion start......
i'm base!
addtion end......
:base (Thread[Daemon worker Thread 17,5,main]) completed. Took 0.0 secs. Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.5.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
VCS Checkout Cache (D:\eclipsWS\gradleWS\gradleDemo\.gradle\vcsWorkingDirs) has not been cleaned up in 0 days
  • 控制台输出类型

    可以指定的类型有:’plain’、’auto’(默认)、’rich’、’verbose’
d:\eclipsWS\gradleWS\gradleDemo>gradle base --console plain
:base
addtion start......
i'm base!
addtion end...... Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.5.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 0s
1 actionable task: 1 executed
d:\eclipsWS\gradleWS\gradleDemo>gradle base --console rich [1A[1m<[0;32;1;0;39;1m-------------> 0% CONFIGURING [0s][m[35D[1B[1A[0K
[1m> Task :base[m[33m [39m
addtion start......
i'm base!
addtion end...... Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.5.1/userguide/command_line_interface.html#sec:command_line_warnings [32;1mBUILD SUCCESSFUL[0;39m in 0s
1 actionable task: 1 executed

windows下显示有点问题,不支持颜色的控制~尊驾可以移步到linux下执行,颜色等都显示出来了

  • status
d:\eclipsWS\gradleWS\gradleDemo>gradle base --status
PID STATUS INFO
59652 IDLE 4.5.1 Only Daemons for the current Gradle version are displayed. See https://docs.gradle.org/4.5.1/userguide/gradle_daemon.html#sec:status
  • scan

    这个过程是需要交互的,同意即可,即输入yes;然后按提供的地址打开url,提供邮件地址;按邮件里的提示查看报告
d:\eclipsWS\gradleWS\gradleDemo>gradle base --scan
:base
addtion start......
i'm base!
addtion end...... Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.5.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 2s
1 actionable task: 1 executed Publishing a build scan to scans.gradle.com requires accepting the Terms of Service defined at https://scans.gradle.com/terms-of-service. Do you accept these terms? [yes, no]
yes
Gradle Cloud Services license agreement accepted. Publishing build scan...
https://gradle.com/s/pmnnhqgqmv4zw
  • 更换setting.gradle配置文件

    将一份配置文件复制到项目外(本例直接复制到d盘),修改其中的项目名称为gradleDemooooooooooooo
rootProject.name = 'gradleDemooooooooooooo'
d:\eclipsWS\gradleWS\gradleDemo>gradle base -c d:\settings.gradle -i
Initialized native services in: C:\Users\yueling.DANGDANG\.gradle\native
The client will now receive all logging from the daemon (pid: 59652). The daemon log file: C:\Users\yueling.DANGDANG\.gradle\daemon\4.5.1\daemon-59652.out.log
Starting 45th build in daemon [uptime: 4 hrs 20 mins 27.835 secs, performance: 100%, no major garbage collections]
Using 4 worker leases.
Starting Build
Settings evaluated using settings file 'D:\settings.gradle'.
Projects loaded. Root project using build file 'D:\build.gradle'.
Included projects: [root project 'gradleDemooooooooooooo']
Evaluating root project 'gradleDemooooooooooooo' using build file 'D:\build.gradle'.
All projects evaluated.
Selected primary task 'base' from project :
Tasks to be executed: [task ':base']
:base (Thread[Task worker for ':',5,main]) started.
:base
Task ':base' is not up-to-date because:
Task has not declared any outputs.
addtion start......
i'm base!
addtion end......
:base (Thread[Task worker for ':',5,main]) completed. Took 0.001 secs. Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.5.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
VCS Checkout Cache (D:\.gradle\vcsWorkingDirs) has not been cleaned up in 0 days
  • 更换build.gradle配置文件

    复制一份配置文件到D盘,并添加任务
task baseadd {
doLast {
println "build.gradle not in dir!"
}
}
d:\eclipsWS\gradleWS\gradleDemo>gradle baseadd -b d:\build.gradle
:baseadd
build.gradle not in dir! Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.5.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 0s
1 actionable task: 1 executed
  • gradle build

    装配所有输出并运行所有检查
d:\eclipsWS\gradleWS\gradleDemo>gradle build
:compileJava :processResources NO-SOURCE
:classes
:jar
:assemble
:compileTestJava
:processTestResources NO-SOURCE
:testClasses
:test
:check
:build Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.5.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 18s
4 actionable tasks: 4 executed
  • gradle run

    运行所有任务
  • gradle check

    验证任务,包括测试和初始化
d:\eclipsWS\gradleWS\gradleDemo>gradle check
:compileJava
:processResources NO-SOURCE
:classes
:compileTestJava
:processTestResources NO-SOURCE
:testClasses
:test
:check Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.5.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 2s
3 actionable tasks: 3 executed
  • gradle clean

    清理所有输出
d:\eclipsWS\gradleWS\gradleDemo>gradle clean
:clean Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.5.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 0s
1 actionable task: 1 executed
  • gradle projects

    项目报告,包括子项目
d:\eclipsWS\gradleWS\gradleDemo>gradle projects
:projects ------------------------------------------------------------
Root project
------------------------------------------------------------ Root project 'gradleDemo'
No sub-projects To see a list of the tasks of a project, run gradle <project-path>:tasks
For example, try running gradle :tasks Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.5.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 0s
1 actionable task: 1 executed
  • gradle tasks

    所有的tasks列表
d:\eclipsWS\gradleWS\gradleDemo>gradle tasks
:tasks ------------------------------------------------------------
All tasks runnable from root project
------------------------------------------------------------ Build tasks
-----------
assemble - Assembles the outputs of this project.
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.
classes - Assembles main classes.
clean - Deletes the build directory.
jar - Assembles a jar archive containing the main classes.
testClasses - Assembles test classes. Build Setup tasks
-----------------
init - Initializes a new Gradle build.
wrapper - Generates Gradle wrapper files. Documentation tasks
-------------------
javadoc - Generates Javadoc API documentation for the main source code. Help tasks
----------
buildEnvironment - Displays all buildscript dependencies declared in root project 'gradleDemo'.
components - Displays the components produced by root project 'gradleDemo'. [incubating]
dependencies - Displays all dependencies declared in root project 'gradleDemo'.
dependencyInsight - Displays the insight into a specific dependency in root project 'gradleDemo'.
dependentComponents - Displays the dependent components of components in root project 'gradleDemo'. [incubating]
help - Displays a help message.
model - Displays the configuration model of root project 'gradleDemo'. [incubating]
projects - Displays the sub-projects of root project 'gradleDemo'.
properties - Displays the properties of root project 'gradleDemo'.
tasks - Displays the tasks runnable from root project 'gradleDemo'. Verification tasks
------------------
check - Runs all checks.
test - Runs the unit tests. Rules
-----
Pattern: clean<TaskName>: Cleans the output files of a task.
Pattern: build<ConfigurationName>: Assembles the artifacts of a configuration.
Pattern: upload<ConfigurationName>: Assembles and uploads the artifacts belonging to a configuration. To see all tasks and more detail, run gradle tasks --all To see more detail about a task, run gradle help --task <task> Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.5.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed

gradle tasks –all

  • gradle -q help –task base

    展示指定任务的详细信息
d:\eclipsWS\gradleWS\gradleDemo>gradle -q help --task base
Detailed task information for base Path
:base Type
Task (org.gradle.api.Task) Description
- Group
-
  • gradle dependencies

    展示项目依赖
d:\eclipsWS\gradleWS\gradleDemo>gradle dependencies
:dependencies ------------------------------------------------------------
Root project
------------------------------------------------------------ api - API dependencies for source set 'main'. (n)
\--- org.apache.commons:commons-math3:3.6.1 (n) apiElements - API elements for main. (n)
No dependencies archives - Configuration for archive artifacts.
No dependencies compile - Dependencies for source set 'main' (deprecated, use 'implementation ' instead).
No dependencies compileClasspath - Compile classpath for source set 'main'.
+--- org.apache.commons:commons-math3:3.6.1
\--- com.google.guava:guava:23.0
+--- com.google.code.findbugs:jsr305:1.3.9
+--- com.google.errorprone:error_prone_annotations:2.0.18
+--- com.google.j2objc:j2objc-annotations:1.1
\--- org.codehaus.mojo:animal-sniffer-annotations:1.14 compileOnly - Compile only dependencies for source set 'main'.
No dependencies
……
  • gradle buildEnvironment

    展示构建环境依赖关系报告
  • gradle dependencyInsight

    展示依赖关系报告
  • gradle model

    展示模型关系报告
d:\eclipsWS\gradleWS\gradleDemo>gradle model
:model ------------------------------------------------------------
Root project
------------------------------------------------------------ + binaries
| Type: org.gradle.platform.base.BinaryContainer
| Creator: BinaryBasePlugin.Rules#binaries(BinaryContainer)
| Rules:
? JavaBasePlugin.Rules#attachBridgedBinaries(BinaryContainer, JavaBasePlugin.BridgedBinaries)
+ main
| Type: org.gradle.api.internal.jvm.DefaultClassDirectoryBinarySpec_Decorated
| Value: Classes 'main'
| Creator: JavaBasePlugin.Rules#attachBridgedBinaries(BinaryContainer, JavaBasePlugin.BridgedBinaries) > put()
| Rules:
? BinaryBasePlugin.Rules#defineBuildLifecycleTask(BinarySpecInternal, ITaskFactory)
? BinaryBasePlugin.Rules#addSourceSetsOwnedByBinariesToTheirInputs(BinarySpecInternal)
+ test
| Type: org.gradle.api.internal.jvm.DefaultClassDirectoryBinarySpec_Decorated
| Value: Classes 'test'
| Creator: JavaBasePlugin.Rules#attachBridgedBinaries(BinaryContainer, JavaBasePlugin.BridgedBinaries) > put()
| Rules:
? BinaryBasePlugin.Rules#defineBuildLifecycleTask(BinarySpecInternal, ITaskFactory)
? BinaryBasePlugin.Rules#addSourceSetsOwnedByBinariesToTheirInputs(BinarySpecInternal)
+ components
| Type: org.gradle.platform.base.ComponentSpecContainer
| Creator: ComponentBasePlugin.PluginRules#components(ComponentSpecContainer)
……

还有一些没有演示的命令,根据帮助文档都能尝试一下

gradle命令学习的更多相关文章

  1. android studio学习----gradle命令详解

    首先来给大家介绍一种简便并且个人最喜欢的一种办法.很多时候我们在GitHub上看到一个不错的开源项目,一般有两种需求,阅读源码和查看运行效果,如果是单纯的查看源码我更喜欢用一些轻量级编辑器,如vim, ...

  2. 【转载】Gradle学习 第十一章:使用Gradle命令行

    转载地址:http://ask.android-studio.org/?/article/94 This chapter introduces the basics of the Gradle com ...

  3. Android使用Gradle命令动态传参完成打包,不需要修改代码

    不得不说,Gradle很强大,有人会问Gradle是什么?这里也不细讲,在我认为他就是一个构建神器.Gradle 提供了: 一个像 Ant 一样的非常灵活的通用构建工具 一种可切换的, 像 Maven ...

  4. 别出心裁的Linux命令学习法

    别出心裁的Linux命令学习法 操作系统操作系统为你完成所有"硬件相关.应用无关"的工作,以给你方便.效率.安全.操作系统的功能我总结为两点:管家婆和服务生: 管家婆:通过进程.虚 ...

  5. Git版本控制软件结合GitHub从入门到精通常用命令学习手册(转)

    简要参考:http://www.tuicool.com/articles/mEvaq2 http://gitref.org/zh/index.html GIT 学习手册简介 本站为 Git 学习参考手 ...

  6. android studio从1.5更新到2.0后terminal无法运行gradle命令,提示无法找到gradle命令

    android studio从1.5更新到2.0后terminal无法运行gradle命令,提示无法找到gradle命令. 'gradle' 不是内部或外部命令,也不是可运行的程序 或批处理文件. 设 ...

  7. penghui_031413 Bat命令学习

    penghui_031413   Bat命令学习 基础部分:====================================================================== ...

  8. Gradle命令行黑魔法

    毫无疑问,现在Gradle已经成为java世界最火的构建工具,风头已经盖过了冗余的ant,落后的maven.Gradle是以Groovy语言编写的一套构建脚本的DSL,由于Groovy语法的优雅,所以 ...

  9. Android Studio系列教程五--Gradle命令详解与导入第三方包

    Android Studio系列教程五--Gradle命令详解与导入第三方包 2015 年 01 月 05 日 DevTools 本文为个人原创,欢迎转载,但请务必在明显位置注明出处!http://s ...

随机推荐

  1. 接口如何使用(以笑话大全api为例)

    接口如何使用(以笑话大全api为例) 一.总结 一句话总结:直接用ajax,或者post,get方式向接口网址请求数据,然后接收网站传过来的数据就好,和我们写网站的时候前台向后台请求数据的方式一样. ...

  2. jquery中empty()和remove()的区别

    empty 顾名思义,清空方法,但是与删除又有点不一样,因为它只移除了 指定元素中的所有子节点. remove与empty一样,都是移除元素的方法,但是remove会将元素自身移除,同时也会移除元素内 ...

  3. Loadrunner--基准测试的两种方法

    2 练习基准测试方法1 2.1 问题 为登录业务设计场景. 2.2 方案 在控制台中使用循环多次的方式执行场景.(多次数) 2.3 步骤 实现此案例需要执行以下步骤: 步骤一: 1.打开控制台,如下图 ...

  4. 写给自己的TypeScript 入门小纲

    前几日,在知乎上写了一些技术类的文章,有人私信问我,是不是要找一份工作,有没有想过要跳槽,然后我回到,你们公司都是用的什么框架什么技术,他罗列了一堆,其中就包含了TypeScript,我甚至不知道有这 ...

  5. 使用 JS 关闭警告框及监听自定义事件(amaze ui)

    使用 JS 关闭警告框及监听自定义事件(amaze ui) 一.总结 1.jquery匿名函数:第8行,jquery匿名函数,$(function(){});,有没有很简单,只是少了jquery的前面 ...

  6. vue使用改变element-ui主题色

    每个项目的主题色一般都不一样,直接用element-ui的默认主题色似乎有点不合适,还需要自己一个一个的找元素class名然后在修改样式,非常麻烦,还容易影响到包含该类名的其他元素样式,所以需要自定义 ...

  7. 自己定义Dialog的具体步骤(实现自己定义样式一般原理)

    转载请标注转载http://blog.csdn.net/oqihaogongyuan/article/details/50958659 自己定义Dialog的具体步骤(实现自己定义样式一般原理)    ...

  8. 小型机与pc服务器区别

    按CPU的类型来区分,小型机是基于RISC(精简指令集)架构的专用服务器,而服务器是基于CISC(复杂指令集)架构的PC服务器.小型机相对于普通服务器来说,一直有不可比拟的优势.(1)如必能稳定,它具 ...

  9. swift学习第十天:函数

    函数的介绍 函数相当于OC中的方法 函数的格式如下 func 函数名(参数列表) -> 返回值类型 { 代码块 return 返回值 } func是关键字,多个参数列表之间可以用逗号(,)分隔, ...

  10. 选择标识符(identifier)

    整数通常是标识列最好的选择,因为它们很快并且可以使用auto_increment:千万不要使用enum和set类型作为标识列:尽量避免使用字符串类型作为标识列,因为他们很消耗空间,并且通常比数字类型慢 ...