美文网首页
Gradle, in one word

Gradle, in one word

作者: ThomasLiao | 来源:发表于2019-01-01 22:46 被阅读5次

build script

Everything in Gradle sits on top of two basic concepts: projects and tasks.

  • Every Gradle build is made up of one or more projects.
  • Each project is made up of one or more tasks.

project

  • There is a one-to-one relationship between a Project and a build.gradle file
  • 创建setting实例,根据settings.gradle来决定project的层级关系
  • 执行projects根据广度遍历规则

build.gradle

automatically looks for this file as the build script

plugin

  • Plugins bundle additional tasks into Gradle that focus on a specific functionality.

  • Plugins can be used to modularise and reuse project configuration.

task

A project is essentially a collection of Task objects

run gradle

  • gradle command looks for a file called build.gradle
  • gradle -b

gradle -q

忽略Gradle的log信息,只显示task的结果


doFirst doLast

将一个action头插入或者尾插入action list中。action list是按照顺序执行的

Build Variant

The combination of Build Type and Flavor is known as Build Variant.

Build Type

Build Type refers to build and packaging settings like signing configuration for a project.

  • debug
  • release

Flavour

A flavor is used to specify custom features, minimum and target API levels, device and API requirements like layout, drawable and custom code (for example, if production code is slightly different than development code).

相关文章

网友评论

      本文标题:Gradle, in one word

      本文链接:https://www.haomeiwen.com/subject/wbnolqtx.html