Simple gradle xtext generator example? [message #1733522] |
Sun, 29 May 2016 12:45 |
Eclipse User |
|
|
|
Hey guys I am trying to make a simple gradle plugin by following the guide http://xtext.github.io/xtext-gradle-plugin/xtext-builder.html but I think the simple example does not execute the generator associated with my simple language.
I did look at the other examples (xtend plugin, android plugin) but I still can't figure it out.
This is what I have so far and I believe this is due to my complete lack of knowledge of the gradle api and the xtext gradle plugins.
package org.specapi.gradle
import org.gradle.api.*
import org.xtext.gradle.*
import org.xtext.gradle.tasks.*
class SpecApiPlugin implements Plugin<Project> {
override apply(Project project) {
project.apply[plugin(XtextBuilderPlugin)]
val xtext = project.extensions.getByType(XtextExtension)
val specapi = xtext.languages.maybeCreate("specapi") => [
setup = "org.specapi.SpecApiLangStandaloneSetup"
fileExtension = "specapi"
]
}
}
So the question is how do I execute my generator the simple way? 
Cheers,
Ian
|
|
|
Powered by
FUDForum. Page generated in 0.03060 seconds