-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For plugin & web-plugin application-type, add the Grails plugin descriptor file.
- Loading branch information
1 parent
f979688
commit 21dd3fa
Showing
4 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
80 changes: 80 additions & 0 deletions
80
grails-forge-core/src/main/java/org/grails/forge/feature/grails/templates/plugin.rocker.raw
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
@import org.grails.forge.application.Project | ||
@import org.grails.forge.application.ApplicationType | ||
@import org.grails.forge.util.VersionInfo | ||
|
||
@args(Project project, ApplicationType applicationType) | ||
|
||
@grailsVersion => { @VersionInfo.getGrailsVersion() } | ||
|
||
package @project.getPackageName() | ||
|
||
import grails.plugins.* | ||
|
||
class @project.getClassName()GrailsPlugin extends Plugin { | ||
|
||
// the version or versions of Grails the plugin is designed for | ||
def grailsVersion = "@grailsVersion > *" | ||
// resources that are excluded from plugin packaging | ||
def pluginExcludes = [ | ||
"grails-app/views/error.gsp" | ||
] | ||
|
||
// TODO Fill in these fields | ||
def title = "@project.getNaturalName()" // Headline display name of the plugin | ||
def author = "Your name" | ||
def authorEmail = "" | ||
def description = '''\ | ||
Brief summary/description of the plugin. | ||
''' | ||
@if(applicationType == ApplicationType.WEB_PLUGIN) { | ||
def profiles = ['web'] | ||
} | ||
|
||
// URL to the plugin's documentation | ||
def documentation = "https://grails.github.io/@project.getClassName()/" | ||
|
||
// Extra (optional) plugin metadata | ||
|
||
// License: one of 'APACHE', 'GPL2', 'GPL3' | ||
// def license = "APACHE" | ||
|
||
// Details of company behind the plugin (if there is one) | ||
// def organization = [ name: "My Company", url: "https://www.my-company.com/" ] | ||
|
||
// Any additional developers beyond the author specified above. | ||
// def developers = [ [ name: "Joe Bloggs", email: "joe@@bloggs.net" ]] | ||
|
||
// Location of the plugin's issue tracker. | ||
// def issueManagement = [ system: "GitHub", url: "https://github.com/grails/@project.getClassName()/issues" ] | ||
|
||
// Online location of the plugin's browseable source code. | ||
// def scm = [ url: "https://github.com/grails/@project.getClassName()" ] | ||
|
||
Closure doWithSpring() { {-> | ||
// TODO Implement runtime spring config (optional) | ||
} | ||
} | ||
|
||
void doWithDynamicMethods() { | ||
// TODO Implement registering dynamic methods to classes (optional) | ||
} | ||
|
||
void doWithApplicationContext() { | ||
// TODO Implement post initialization spring config (optional) | ||
} | ||
|
||
void onChange(Map<String, Object> event) { | ||
// TODO Implement code that is executed when any artefact that this plugin is | ||
// watching is modified and reloaded. The event contains: event.source, | ||
// event.application, event.manager, event.ctx, and event.plugin. | ||
} | ||
|
||
void onConfigChange(Map<String, Object> event) { | ||
// TODO Implement code that is executed when the project configuration changes. | ||
// The event is the same as for 'onChange'. | ||
} | ||
|
||
void onShutdown(Map<String, Object> event) { | ||
// TODO Implement code that is executed when the application shuts down (optional) | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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