Introduction

Prerequisites

General Prerequisites

Make yourself familiar with

Prerequisites for Gradle Plugin Development

You should definitely read the original Gradle Plugin Development Guide on custom plugin development.

Adding New Checks

To add new checks, you have to subclass from 'org.aim42.htmlsanitycheck.check.Checker' and implement the 'performCheck' method - which requires an 'HtmlPage' instance as parameter.

Remember to:

Directory Structure and Required Files

Core Module

TBD

Gradle Plugin

|-htmlSanityCheck
   |  htmlSanityCheck-gradle-plugin
   |  |  |-src
   |  |  |  |-main
   |  |  |  |  |-org
   |  |  |  |  |  |-aim42
   |  |  |  |  |  |  |-htmlsanitycheck
   |  |  |  |  |  |  |  |-gradle
   |  |  |  |  |  |  |  |  | ...
   |  |  |  |  |  |  |  |  |-HtmlSanityCheckPlugin.groovy (1)
   |  |  |  |  |  |  |  |  |-HtmlSanityCheckTask.groovy
   |  |  |  |  |-resources
   |  |  |  |  |  |-META-INF                          (2)
   |  |  |  |  |  |  |-gradle-plugins
   |  |  |  |  |  |  |  |-htmlSanityCheck.properties  (3)
   |  |  |  |-test
   |  |  |  |  |-org
   |  |  |  |  |  |-aim42
   |  |  |  |  |  |  |-htmlsanitycheck
   |  |  |  |  |  |  |  |-gradle
   |  |  |  |  |  |  |  |  | ...
   |  |  |  |  |  |  |  |  |-HtmlSanityCheckPluginSpec
   |
1 the actual plugin code, a xyzPlugin and xyzTask groovy files
2 Gradle expects plugin properties in META-INF
3 Property file containing the name of the actual implementation class:
implementation-class=org.aim42.htmlsanitycheck.gradle.HtmlSanityCheckPlugin

Notes for IntelliJ Users

If you work with IntelliJ, you should configure your run- and test configurations so that the working-directory is set to your current module - most easily done by making $MODULE_DIR$ your default.

intellij run configuration