Gradle plugins, Groovy and DSL

  Gradle to write plug-ins may need a little Goovy knowledge, specific written directly written in java language can, Goovy is fully compatible with java, just plug the inlet portion of the interception achieve PluginEntry.groovy.
  Gradle domain object itself mainly Project and Task. Project provides for the Task execution context, all of the Plugin is used to configure either add Property to the Project, or to add different Task Project. Task represents a more logical one independent execution process, such as compiling Java source code, copy files, packing Jar file, or even a system command may be executed or invoked Ant. Further, a Task may be read and set the Property Project to accomplish specific operations.

Gradle plugin - https://github.com/xsfelvis/GradlePluginStudy
Gradle plugin from introductory to advanced - https://juejin.im/post/5ccf02e36fb9a0322e73a3db
  Groovy basis, Android DSL basis.
  Gradle build script default name is build.gradle, when executed gradle command in a shell, Gradle will look for the name of the directory is currently build.gradle file. In Gradle an atomic operation is called task, is understood as a simple task Gradle script executable minimum unit.
  Gradle supports a feature up-to-date inspection is called, is often said that the incremental build. The results of the Task Gradle will each run of cached, when the next run, checks the output has not changed, if no change is skipped running, this can increase the speed of Gradle build. Typically, a task there will be some input (inputs) and some output (outputs), input task will affect its output.

Guess you like

Origin blog.csdn.net/ShareUs/article/details/89920547