1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00

Constants.

This commit is contained in:
Cedric Beust 2016-02-23 06:15:13 -08:00
parent 6323079b63
commit 1ac4896717
2 changed files with 10 additions and 2 deletions

View file

@ -7,6 +7,10 @@ import com.beust.kobalt.Args
* a new project).
*/
interface ITemplateContributor {
companion object {
val DIRECTORY_NAME = "templates"
}
val templates: List<ITemplate>
}

View file

@ -8,10 +8,14 @@ import com.beust.kobalt.plugin.KobaltPlugin
* Template that generates a Kobalt plug-in project.
*/
class KobaltPluginTemplate : ITemplateContributor {
val pluginTemplate = object: JarTemplate("templates/kobaltPlugin/kobaltPlugin.jar") {
companion object {
val NAME = "kobaltPlugin"
}
val pluginTemplate = object: JarTemplate(ITemplateContributor.DIRECTORY_NAME + "/" + NAME) {
override val templateDescription = "Generate a sample Kobalt plug-in project"
override val templateName = "kobaltPlugin"
override val templateName = NAME
override val pluginName = KobaltPlugin.PLUGIN_NAME
}