Skip to content

Instantly share code, notes, and snippets.

@pallocchi
Last active August 29, 2015 14:23
Show Gist options
  • Save pallocchi/1c8f789e12139bedea51 to your computer and use it in GitHub Desktop.
Save pallocchi/1c8f789e12139bedea51 to your computer and use it in GitHub Desktop.
Gradle plugin
package com.mandarine.gradle;
import org.gradle.api.*;
class ToysPlugin implements Plugin<Project> {
public static final String GROUP = 'Toys'
void apply(Project project){
project.task('woody', description: 'Woody quote.', group: GROUP) << {
println 'Hey, Buzz! You are flying!'
}
project.task('buzz', description: 'Buzz quote.', group: GROUP) << {
println 'This is not flying. This is falling with style!.'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment