forked from bertramdev/seed-me
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSeedMeGrailsPlugin.groovy
45 lines (37 loc) · 1.5 KB
/
SeedMeGrailsPlugin.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
class SeedMeGrailsPlugin {
def version = "0.7.2"
def grailsVersion = "2.0 > *"
def pluginExcludes = [
"src/seed/*",
"grails-app/domain/seedme/Child.groovy",
"grails-app/domain/seedme/ChildParentRequired.groovy",
"grails-app/domain/seedme/ParentHasManyChildren.groovy",
"grails-app/domain/seedme/ParentHasOneChild.groovy"
]
def title = "SeedMe Plugin"
def description = "Implements a standard convention for adding seed data to your application."
def documentation = "http://github.com/bertramdev/seed-me"
def license = "APACHE"
def organization = [ name: "Bertram Capital", url: "http://www.bertramcapital.com/" ]
def developers = [
[name: 'Brian Wheeler', email: '[email protected]'],
[name: 'David Estes', email: '[email protected]'],
[name: 'Jordon Saardchit', email: '[email protected]'],
[name: 'Jeremy Crosbie', email: '[email protected]'],
[name: 'Jeremy Leng', email: '[email protected]'],
[name:' William Chu', email: '[email protected]']]
def scm = [ url: "http://github.com/bertramdev/seed-me" ]
def issueManagement = [ system: "GITHUB", url: "http://github.com/bertramdev/seed-me/issues" ]
def doWithApplicationContext = { applicationContext ->
}
def watchedResources = "file:./seed/*.groovy"
def onChange = { event ->
def autoSeed = application.config.grails.seed.autoSeed
if(!(autoSeed instanceof Boolean)) {
autoSeed = true
}
if(autoSeed && event.source && event.ctx) {
event.ctx.seedService.installSeedData()
}
}
}