Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext Gradle Plugin and Xtext Builder(Continuous Deployment, Xtext Gradle Plugin)
Xtext Gradle Plugin and Xtext Builder [message #1791166] Mon, 25 June 2018 12:15 Go to next message
Tobias Blaufuß is currently offline Tobias BlaufußFriend
Messages: 4
Registered: June 2018
Junior Member
Goal
Hi, I'm currently trying to use the Xtext Builder of the Xtext gradle plugin (Can't post link to github here, because it's my first post) to trigger the generator of a project that uses the grammar of my DSL. (mainly for continuous deployment)

Current situation
My project consists of several DSLs that can be built via a gradle script and one project that uses all of these languages to define some models. At the moment i start a new Eclipse Application, generate the source code of my model with the help of eclipse and deploy the generated artifacts afterwards.

Problem
I want to get rid of this manual step by using the Xtext Builder but i can't apply the maven/gradle example of the Xtext Builder documentation to my pure gradle project structure... I've tried a lot of things but now i'm a little bit frustrated because i'm not making any progress and i have to admit i'm kind of stuck...

Gradle project structure
This is the overall project structure (Gradle project with subprojects):

root
|- build.gradle
|- settings.gradle
|- ... (Other gradle stuff)

|- dsl1 (File extension: dsl1)
|-|- dsl1 (gradle)
|-|-|- src/dsl1.Dsl1.xtext
|-|-|- src/dsl1.Dsl1StandaloneSetup.xtend
|-|-|- ... (It's basically the general Xtext project structure)
|-|- dsl1.ide (gradle)
|-|- dsl1.target
|-|- dsl1.tests (gradle)
|-|- dsl1.ui
|-|- dsl1.ui.tests

|- dsl2 (File extension: dsl2)
|-|- ... (same as dsl1)

|- dsl3 (File extension: dsl3)
|-|- ... (same as dsl1)

|- dsl-models (Just a folder to hold some projects)
|-|- model1 (DSL project, that uses dsl1, dsl2, dsl3, gradle)
|-|-|- src (*.dsl1, *.dsl2, *.dsl3 files)
|-|-|- src-gen (output directory for generator)

Question
When i call 'gradle build' inside the root directory all my languages will be built with gradle and then gradle should execute all generators of dsl1, dsl2 and dsl3.

Has anyone an idea how to achieve this? Just let me know if you need some more information on my project structure, source files or builds. My intention was to create a small and simple thread without information that is not necessary, so it might be possible that something is missing.


Thank you in advance
Tobias
Re: Xtext Gradle Plugin and Xtext Builder [message #1791570 is a reply to message #1791166] Mon, 02 July 2018 14:58 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
that is the exact problem you had with that?
you should be ablte to specify the xtext gradle plugin to use dsl1 dsl2 and dsl3 in your dsl-models project
see http://xtext.github.io/xtext-gradle-plugin/xtext-builder.html


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext Gradle Plugin and Xtext Builder [message #1791627 is a reply to message #1791570] Tue, 03 July 2018 07:46 Go to previous messageGo to next message
Tobias Blaufuß is currently offline Tobias BlaufußFriend
Messages: 4
Registered: June 2018
Junior Member
Sadly i was not able to do it with the xtext builder plugin. But i created a standalone setup for each language and packaged each setup into an executable Jar file with gradle. The jar expects the base path of all resource files and an output directory as parameters.
Re: Xtext Gradle Plugin and Xtext Builder [message #1791636 is a reply to message #1791627] Tue, 03 July 2018 08:34 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
could you please create a complete sample project (hello world) showing the problem

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Gradle and GeneratorFragment
Next Topic:Grammar for nested units
Goto Forum:
  


Current Time: Fri Apr 26 14:32:30 GMT 2024

Powered by FUDForum. Page generated in 0.02962 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top