diff options
author | 2023-04-08 22:56:44 +0200 | |
---|---|---|
committer | 2023-04-08 22:58:21 +0200 | |
commit | 561fac70fd3dc3ebe1cfbc50146757495fb828d5 (patch) | |
tree | 20aa72bbe438aaa70c8de264ff0d366758e7772d /subprojects/language/build.gradle | |
parent | refactor: remove TupleLike (diff) | |
download | refinery-561fac70fd3dc3ebe1cfbc50146757495fb828d5.tar.gz refinery-561fac70fd3dc3ebe1cfbc50146757495fb828d5.tar.zst refinery-561fac70fd3dc3ebe1cfbc50146757495fb828d5.zip |
build: convert Gradle scripts to Kotlin
Improves IDE support build scripts in IntelliJ.
There is no Eclipse IDE support, but Eclipse didn't have support for Groovy
either, so there is no degradation of functionality.
Diffstat (limited to 'subprojects/language/build.gradle')
-rw-r--r-- | subprojects/language/build.gradle | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/subprojects/language/build.gradle b/subprojects/language/build.gradle deleted file mode 100644 index 654558e3..00000000 --- a/subprojects/language/build.gradle +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | plugins { | ||
2 | id 'refinery-java-library' | ||
3 | id 'refinery-java-test-fixtures' | ||
4 | id 'refinery-mwe2' | ||
5 | id 'refinery-sonarqube' | ||
6 | id 'refinery-xtext-conventions' | ||
7 | } | ||
8 | |||
9 | dependencies { | ||
10 | api platform(libs.xtext.bom) | ||
11 | api libs.ecore | ||
12 | api libs.xtext.core | ||
13 | api libs.xtext.xbase | ||
14 | api project(':refinery-language-model') | ||
15 | testFixturesApi libs.xtext.testing | ||
16 | mwe2 libs.xtext.generator | ||
17 | mwe2 libs.xtext.generator.antlr | ||
18 | } | ||
19 | |||
20 | sourceSets { | ||
21 | testFixtures { | ||
22 | java.srcDirs += ['src/testFixtures/xtext-gen'] | ||
23 | resources.srcDirs += ['src/testFixtures/xtext-gen'] | ||
24 | } | ||
25 | } | ||
26 | |||
27 | tasks.named('jar') { | ||
28 | from(sourceSets.main.allSource) { | ||
29 | include '**/*.xtext' | ||
30 | } | ||
31 | } | ||
32 | |||
33 | def generateXtextLanguage = tasks.register('generateXtextLanguage', JavaExec) { | ||
34 | mainClass = 'org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher' | ||
35 | classpath = configurations.mwe2 | ||
36 | inputs.file 'src/main/java/tools/refinery/language/GenerateProblem.mwe2' | ||
37 | inputs.file 'src/main/java/tools/refinery/language/Problem.xtext' | ||
38 | outputs.dir 'src/main/xtext-gen' | ||
39 | outputs.dir 'src/testFixtures/xtext-gen' | ||
40 | outputs.dir '../language-ide/src/main/xtext-gen' | ||
41 | outputs.dir '../language-web/src/main/xtext-gen' | ||
42 | args += 'src/main/java/tools/refinery/language/GenerateProblem.mwe2' | ||
43 | args += '-p' | ||
44 | args += "rootPath=/${projectDir}/.." | ||
45 | } | ||
46 | |||
47 | for (taskName in [ | ||
48 | 'compileJava', | ||
49 | 'processResources', | ||
50 | 'processTestFixturesResources', | ||
51 | 'generateEclipseSourceFolders' | ||
52 | ]) { | ||
53 | tasks.named(taskName) { | ||
54 | dependsOn generateXtextLanguage | ||
55 | } | ||
56 | } | ||
57 | |||
58 | tasks.named('clean') { | ||
59 | delete 'src/main/xtext-gen' | ||
60 | delete 'src/testFixtures/xtext-gen' | ||
61 | delete '../language-ide/src/main/xtext-gen' | ||
62 | delete '../language-web/src/main/xtext-gen' | ||
63 | } | ||
64 | |||
65 | sonarqube.properties { | ||
66 | properties['sonar.exclusions'] += [ | ||
67 | 'src/testFixtures/xtext-gen/**', | ||
68 | ] | ||
69 | } | ||
70 | |||
71 | eclipse.project.natures += [ | ||
72 | 'org.eclipse.xtext.ui.shared.xtextNature' | ||
73 | ] | ||