• Stars
    star
    117
  • Rank 301,828 (Top 6 %)
  • Language
    Groovy
  • License
    Apache License 2.0
  • Created almost 11 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Gradle Watch Plugin

Gradle Watch Plugin 0.1.5 Build Status

Run predefined tasks whenever watched file patterns are added, changed or deleted.

Requirements

  • Oracle JDK7+
  • Gradle 1.9+

Usage

To use the Watch plugin, include in your build script:

Example 1. Using the Watch plugin

build.gradle

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.bluepapa32:gradle-watch-plugin:0.1.5'
    }
}   

apply plugin: 'com.bluepapa32.watch'

Tasks

The Watch plugin adds the following tasks to the project.

Table 1. Watch plugin - tasks

Task name Depends on Type Description
watch - WatchTask Run predefined tasks whenever watched file patterns are added, changed or deleted.

Configuration

watch {

    java {
        files files('src/main/java')
        tasks 'compileJava'
    }

    resources {
        files fileTree(dir: 'src/main/resources',
                       include: '**/*.properties')
        tasks 'processResources'
    }

    hoge {
        files files('foo/bar', 'foo/boo/hoo.txt')
        tasks 'hogehoge', 'hugohugo'
    }
}