Gradle Web Preview Plugin

Gradle plugin used to serve local web content previews.

View on GitHub Open Issues Gradle Plugins Page

Get It

Build script snippet for use in all Gradle versions:
buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "gradle.plugin.com.stehno.gradle:webpreview:0.3.0"
  }
}

apply plugin: "com.stehno.gradle.webpreview"
Build script snippet for new, incubating, plugin mechanism introduced in Gradle 2.1:
plugins {
  id "com.stehno.gradle.webpreview" version "0.3.0"
}

Configure It

To configure the Web Preview plugin, the `webPreview` extension is provided:

webPreview {
    port = 0
    copyUrl = true
    resourceDir = file('build/web')
    contextPath = '/'
}

where:

Use It

The plugin provides two tasks: