Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Document Properties Marker
overridefalse
Short DescriptionGradle Plugin Concept and Development 
Doctypearchitecture-aspecthide
NameGradle Plugin Concept and Development 
Parent
Parent Property
property-nameName
 
Audience
Name List
doctyperole
propertyAudience
 
Categories
Name List
doctypecategory
propertyCategories
 
Tags
Tag List
propertyTags
 
Iteration
Iteration
valuefacadefilled
 
Sort Key000200hide
Section
titleDescription

You should definitely read the original [Gradle User Guide] on custom plugin development.

To enable the required Gradle integration, we implement a lean wrapper as described in the Gradle user guide.

Code Block
languagegroovy
class HtmlSanityCheckPlugin implements Plugin<Project> {
  void apply(Project project) {
    project.task('htmlSanityCheck',
            type: HtmlSanityCheckTask,
            group: 'Check')
  }
}
Content Marker
idContent
Section
titleDirectory Structure and Required Files
Code Block
languagetext
|-htmlSanityCheck
   |  |-src
   |  |  |-main
   |  |  |  |-org
   |  |  |  |  |-aim42
   |  |  |  |  |  |-htmlsanitycheck
   |  |  |  |  |  |  | ...
   |  |  |  |  |  |  |-HtmlSanityCheckPlugin.groovy (1)
   |  |  |  |  |  |  |-HtmlSanityCheckTask.groovy
   |  |  |  |-resources
   |  |  |  |  |-META-INF                           (2)                     
   |  |  |  |  |  |-gradle-plugins
   |  |  |  |  |  |  |-htmlSanityCheck.properties   (3)
   |  |  |-test
   |  |  |  |-org
   |  |  |  |  |-aim42
   |  |  |  |  |  |-htmlsanitycheck
   |  |  |  |  |  |  | ...
   |  |  |  |  |  |  |-HtmlSanityCheckPluginTest
   |
  1. the actual plugin code: HtmlSanityCheckPlugin and HtmlSanityCheckTask groovy files
  2. Gradle expects plugin properties in META-INF
  3. Property file containing the name of the actual implementation class:
Section
titlePassing Parameters From Buildfile to Plugin

To be done

Section
titleBuilding the Plugin

The plugin code itself is built with Gradle.

Section
titleUploading to Public Archives

To be done

Section
titleFurther Information on Creating Gradle Plugins

Although writing plugins is described in the Gradle user guide, a clearly explained sample is given in a Code4Reference tutorial.

Section
titleMotivation
Section
level2
titleQuality Scenarios
Display Table
doctypequality-scenario
render-no-hits-as-blanktrue
selectName, Short Description
restrict-to-immediate-childrentrue
empty-as-nonetrue
Section
level2
titleUse Cases
Display Table
doctypeuse-case
render-no-hits-as-blanktrue
selectName, Short Descriptionsort-bySort Key, Name
restrict-to-immediate-childrentrue
sort-bySort Key, Name
empty-as-nonetrue
Section
titleSolution
Section
level2
titleConstraints
Display Table
sort-by
doctypeproject-constraint
render-no-hits-as-blanktrue
selectName, Short DescriptionSort Key, Name
restrict-to-immediate-childrentrue
sort-bySort Key, Name
empty-as-nonetrue
Section
level2
titleDecisions
Display Table
doctypearchitecture-decision
render-no-hits-as-blanktrue
selectName, Short Descriptionsort-bySort Key, Name
restrict-to-immediate-childrentrue
sort-bySort Key, Name
empty-as-nonetrue
Section
titleApplication

Section
titleDiscussion

Section
titleSubordinate Aspects
Display Table
sort-by
doctypearchitecture-aspect
render-no-hits-as-blanktrue
selectName, Short DescriptionSort Key, Name
restrict-to-immediate-childrentrue
sort-bySort Key, Name
Section
required-permissionswrite-access
titleNotes

...