This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DateTime.metaClass.next << { -> delegate.plusDays(1) } | |
Interval interval = ... | |
def start = interval.start | |
def finish = interval.end | |
for (day in start..finish) { | |
// ... | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
g8 chrislewis/basic-project |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'groovy' | |
apply plugin: 'idea' | |
task initProject(description: 'Initialize project directory structure.') << { | |
// Default package to be created in each src dir. | |
def defaultPackage = 'com/robbyp/greg' | |
['java', 'groovy', 'resources'].each { | |
// convention.sourceSets contains the directory structure | |
// for our Groovy project. So we use this struture |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Based on http://mrhaki.blogspot.co.uk/2009/11/using-gradle-for-mixed-java-and-groovy.html | |
// Updated for Gradle 1.0 | |
// Thanks Mr Haki!! | |
apply plugin: 'scala' | |
task initProject(description: 'Initialize project directory structure.') << { | |
// Default package to be created in each src dir. | |
def defaultPackage = 'com/robbyp/project' | |