All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.grails.gradle.plugin.watch.WatchConfig.groovy Maven / Gradle / Ivy

There is a newer version: 6.2.2
Show newest version
package org.grails.gradle.plugin.watch

import groovy.transform.CompileStatic
import groovy.transform.ToString
import org.gradle.api.Named

/**
 *
 * A configuration for watching files for changes
 *
 * @author Graeme Rocher
 * @since 3.0
 */
@CompileStatic
@ToString
class WatchConfig implements Named {

    WatchConfig(String name) {
        this.name = name
    }

    /**
     * The name of the config
     */
    String name
    /**
     * The directory to watch
     */
    File directory


    /**
     * The file extensions to watch
     */
    List extensions

    /**
     * The tasks to execute
     */
    List tasks = []

    /**
     * The tasks to trigger when a modification event is received
     *
     * @param tasks The tasks
     */
    void tasks(String... tasks) {
        this.tasks.addAll(Arrays.asList(tasks))
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy