Skip to content

Nike-Inc/gradle-redwiggler-plugin

Repository files navigation

RedWiggler contract testing plugin

Build Status Download Coverage Status

Overview

Plugin to integrate RedWiggler in a gradle build.

Requirements

This plugin requires gradle 2.9 or greater.

Add to the Classpath of Gradle Build Script

Add the library 'redwiggler-gradle-plugin' to the classpath of gradle build script

    dependencies{
        classpath 'com.nike.redwiggler.gradle:gradle-redwiggler-plugin:<version>'
    }

Apply Plugin

    apply plugin: 'com.nike.redwiggler'

Finalized by

To run redwiggler when another task finishes:

    task integrationTest {
        finalizedBy tasks.redwiggler
    }

Provided Tasks

The plugin adds the following task:

  • redwiggler: runs the contract test report based on the locations of the markdown and test results
  • redwigglerGenerateClasspath: generated the classpath for redwiggler to run
  • redwigglerEndpointSpecificationProvider: creates the endpoint specification provider

Configurations

The configuration block is called "redwiggler" and accepts the following configurations:

Property Name Description Default Value
swaggerFile The location of the swagger.yaml file. ./swagger.yaml
dataDirectory The directory where test results are logged. build/redwiggler-data
output The directory where the test report should be saved. build/redwiggler.html
toolVersion The version of RedWiggler to use. 0.5.1
scalaVersion The version of scala to use. 2.11

Releasing

To release, tag version and version to new version. To release to bintray:

./gradlew bintrayUpload