How to understand new gradle plugins?
satya - 7/14/2018, 5:11:46 PM
Goal
How do I know what new plugins are available?
How do I know what tasks are available for those plugins?
what are the build conventions for those plugins?
satya - 7/14/2018, 5:12:19 PM
Build Init plug in is documented here
satya - 7/16/2018, 3:23:29 PM
Life Cycle tasks are explained here
satya - 7/16/2018, 3:25:38 PM
Life Cycle tasks
They define steps in a particular build flow
Like template/hook pattern they are the template steps
By attaching many plugin tasks that are specific and work horses to these lifecycle tasks they are executed in a particular order
A plugin can define its own life cycle tasks to make sense of its specific build needs.
satya - 7/18/2018, 3:55:37 PM
How are plugins loaded in Gradle?
How are plugins loaded in Gradle?
satya - 7/18/2018, 3:56:57 PM
On Plugins
Gradle at its core intentionally provides very little for real world automation. All of the useful features, like the ability to compile Java code, are added by plugins. Plugins add new tasks (e.g. JavaCompile), domain objects (e.g. SourceSet), conventions (e.g. Java source is located at src/main/java) as well as extending core objects and objects from other plugins.
satya - 7/18/2018, 3:59:08 PM
Primary document on using Plugins is here
satya - 7/18/2018, 4:10:54 PM
Applying a plugin through buildscript block
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:0.4.1"
}
}
apply plugin: "com.jfrog.bintray"
satya - 8/1/2018, 8:30:28 AM
Here is the plugin script block explained
satya - 8/14/2018, 11:59:39 AM
Here is the source cod eof plugins {} script delegate: PluginRequestCollector.java
Here is the source cod eof plugins {} script delegate: PluginRequestCollector.java
satya - 8/14/2018, 12:00:34 PM
How to search github projects for grepping: SOF discussion
satya - 8/14/2018, 12:02:48 PM
Here is an explanation of scripts and their respective delegates
Here is an explanation of scripts and their respective delegates
satya - 8/14/2018, 12:03:53 PM
Interesting how the above doc is constructed from this XML authoring: dsl.xml!!
Interesting how the above doc is constructed from this XML authoring: dsl.xml!!
satya - 8/14/2018, 12:12:08 PM
Here is how you grep a github
PluginUseScriptBlockMetadataExtractor repo:gradle/gradle
This will grep for "PluginUseScriptBlockMetadataExtractor" in the repo path "repo:gradle/gradle"
satya - 8/14/2018, 12:19:03 PM
See this source code for InitialPassStatementTransformer.java for special treatment of this script block
satya - 8/14/2018, 12:24:22 PM
the above class is called from DefaultScriptPluginFactory
the above class is called from DefaultScriptPluginFactory
This goes into what parts of the script is first processed. It is suprizingly involved.
satya - 8/14/2018, 12:25:07 PM
At the end of the line : plugins {} is treated special and different from the start
At the end of the line : plugins {} is treated special and different from the start