diff options
author | 2021-06-29 18:29:13 +0200 | |
---|---|---|
committer | 2021-06-29 18:31:07 +0200 | |
commit | ad35e53fa23be5312f1e4b8d830a73e8ade1f08c (patch) | |
tree | b48aeb3034358e0a02a6d17221428522ad879b77 /language-model/build.gradle | |
parent | Remove Xtext generated Javascript file (diff) | |
download | refinery-ad35e53fa23be5312f1e4b8d830a73e8ade1f08c.tar.gz refinery-ad35e53fa23be5312f1e4b8d830a73e8ade1f08c.tar.zst refinery-ad35e53fa23be5312f1e4b8d830a73e8ade1f08c.zip |
Generate all files on build
Diffstat (limited to 'language-model/build.gradle')
-rw-r--r-- | language-model/build.gradle | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/language-model/build.gradle b/language-model/build.gradle index 08e16a38..51b24134 100644 --- a/language-model/build.gradle +++ b/language-model/build.gradle | |||
@@ -1,5 +1,18 @@ | |||
1 | configurations { | ||
2 | mwe2 { | ||
3 | extendsFrom compile | ||
4 | } | ||
5 | } | ||
6 | |||
1 | dependencies { | 7 | dependencies { |
2 | compile 'org.eclipse.emf:org.eclipse.emf.ecore' | 8 | compile 'org.eclipse.emf:org.eclipse.emf.ecore' |
9 | mwe2 'org.eclipse.emf:org.eclipse.emf.codegen.ecore' | ||
10 | mwe2 'org.eclipse.emf:org.eclipse.emf.ecore' | ||
11 | mwe2 'org.eclipse.emf:org.eclipse.emf.mwe.utils' | ||
12 | mwe2 'org.eclipse.emf:org.eclipse.emf.mwe2.launch' | ||
13 | mwe2 'org.eclipse.emf:org.eclipse.emf.mwe2.lib' | ||
14 | mwe2 "org.eclipse.xtext:org.eclipse.xtext:${xtextVersion}" | ||
15 | mwe2 "org.eclipse.xtext:org.eclipse.xtext.xbase:${xtextVersion}" | ||
3 | } | 16 | } |
4 | 17 | ||
5 | sourceSets { | 18 | sourceSets { |
@@ -8,8 +21,27 @@ sourceSets { | |||
8 | } | 21 | } |
9 | } | 22 | } |
10 | 23 | ||
24 | task generateEPackage(type: JavaExec) { | ||
25 | main = 'org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher' | ||
26 | classpath = configurations.mwe2 | ||
27 | inputs.file "src/main/java/org/eclipse/viatra/solver/language/model/GenerateProblemModel.mwe2" | ||
28 | inputs.file "src/main/resources/model/problem.ecore" | ||
29 | inputs.file "src/main/resources/model/problem.genmodel" | ||
30 | outputs.dir "src/main/emf-gen" | ||
31 | args += "src/main/java/org/eclipse/viatra/solver/language/model/GenerateProblemModel.mwe2" | ||
32 | args += "-p" | ||
33 | args += "rootPath=/${projectDir}" | ||
34 | } | ||
35 | |||
36 | compileJava.dependsOn(generateEPackage) | ||
37 | clean.dependsOn(cleanGenerateEPackage) | ||
38 | |||
11 | eclipse { | 39 | eclipse { |
12 | project { | 40 | project { |
13 | natures += ['org.eclipse.sirius.nature.modelingproject', 'org.eclipse.pde.PluginNature'] | 41 | natures += ['org.eclipse.sirius.nature.modelingproject', 'org.eclipse.pde.PluginNature'] |
14 | } | 42 | } |
43 | |||
44 | classpath { | ||
45 | plusConfigurations += [configurations.mwe2] | ||
46 | } | ||
15 | } \ No newline at end of file | 47 | } \ No newline at end of file |