diff options
-rw-r--r-- | README.md | 29 | ||||
-rw-r--r-- | gradle/java-common.gradle | 4 | ||||
-rw-r--r-- | gradle/xtend.gradle | 6 | ||||
-rw-r--r-- | language-model/META-INF/MANIFEST.MF | 4 |
4 files changed, 23 insertions, 20 deletions
@@ -6,34 +6,31 @@ | |||
6 | 6 | ||
7 | ### With Eclipse IDE | 7 | ### With Eclipse IDE |
8 | 8 | ||
9 | 1. Download and install a _Java 11_ compatible JDK. For Windows, prefer OpenJDK builds from [Adoptium](https://adoptium.net/). | 9 | 1. Download and install a _Java 17_ compatible JDK. For Windows, prefer OpenJDK builds from [Adoptium](https://adoptium.net/). |
10 | 10 | ||
11 | 2. Download and extract the [Eclipse Modeling Tools 2021-09](https://www.eclipse.org/downloads/packages/release/2021-09/r/eclipse-modeling-tools) package. | 11 | 2. Download and extract the [Eclipse IDE for Java and DSL Developers 2021-09](https://www.eclipse.org/downloads/packages/release/2021-09/r/eclipse-ide-java-and-dsl-developers) package. |
12 | 12 | ||
13 | 3. Launch Eclipse and create a new workspace. | 13 | 3. Launch Eclipse and create a new workspace. |
14 | 14 | ||
15 | 4. Switch to the _Java_ perspective and close the _Modeling_ perspective. | 15 | 4. Open _Help > Install New Software..._ and install the following software from the _2021-09_ update site: |
16 | |||
17 | 5. Open _Help > Install New Software..._ and install the following software from the _2021-09_ update site: | ||
18 | * _Modeling > Ecore Diagram Editor (SDK)_ | 16 | * _Modeling > Ecore Diagram Editor (SDK)_ |
19 | * _Modeling > Xtext Complete SDK_ | ||
20 | * _Programming Languages > Xtend IDE_ | ||
21 | 17 | ||
22 | 6. Open _Help > Eclipse Marketplace_ and install _Buildship Gradle Integration_. | 18 | 5. Open _Help > Eclipse Marketplace_ and install the following software: |
19 | * _Java 17 Support for Eclipse 2021-09_ | ||
20 | * _SonarLint_ | ||
23 | 21 | ||
24 | 7. Open _Window > Preferences_ and set the following preferences: | 22 | 6. Open _Window > Preferences_ and set the following preferences: |
25 | * _General > Workspace > Text file encoding_ should be _UTF-8_. | 23 | * _General > Workspace > Text file encoding_ should be _UTF-8_. |
26 | * _General > Workspace > New text file line delimiter_ should be _Unix_. | 24 | * _General > Workspace > New text file line delimiter_ should be _Unix_. |
27 | * Add the JDK 11 to _Java > Installed JREs_. | 25 | * Add the JDK 17 to _Java > Installed JREs_. |
28 | * Make sure JDK 11 is selected for _JavaSE-11_ at _Java > Installed JREs > Execution Environments_. | 26 | * Make sure JDK 17 is selected for _JavaSE-17_ at _Java > Installed JREs > Execution Environments_. |
29 | * Set _Gradle > Java home_ to the `JAVA_HOME` directory (the directory which contains the `bin` directory) of JDK 11. | 27 | * Set _Gradle > Java home_ to the `JAVA_HOME` directory (the directory which contains the `bin` directory) of JDK 17. Here, Buildship will show a yellow warning sign, which can be safely ignored. |
30 | Buildship will show a yellow warning sign, which can be safely ignored. | ||
31 | 28 | ||
32 | 8. Clone the project Git repository but do not import it into Eclipse. | 29 | 7. Clone the project Git repository but do not import it into Eclipse yet. |
33 | 30 | ||
34 | 9. Open a new terminal an run `./gradlew build` (`.\gradlew build` on Windows) in the cloned repository. This should complete without any compilation error. | 31 | 8. Open a new terminal an run `./gradlew build` (`.\gradlew build` on Windows) in the cloned repository. This should complete without any compilation errors. If you get any errors about the JVM version, check whether the `JAVA_HOME` environment variable is set to the location of JDK. You can query the variable with `echo $JAVA_HOME` on Linux and `echo $Env:JAVA_HOME` in PowerShell on Windows. To set it, use `export JAVA_HOME=/java/path/here` or `$Env:JAVA_HOME="C:\java\path\here"`, respectively. |
35 | 32 | ||
36 | 10. Select _File > Import... > Gradle > Existing Gradle Project_ and import the cloned repository in Eclipse. | 33 | 9. Select _File > Import... > Gradle > Existing Gradle Project_ and import the cloned repository in Eclipse. |
37 | Make sure to select the root of the repository (containing this file) as the _Project root directory_ and that the _Gradle distribution_ is _Gradle wrapper_. | 34 | Make sure to select the root of the repository (containing this file) as the _Project root directory_ and that the _Gradle distribution_ is _Gradle wrapper_. |
38 | If you have previously imported the project into Eclipse, this step will likely fail. | 35 | If you have previously imported the project into Eclipse, this step will likely fail. |
39 | In that case, you can remove the projects from Eclipse, run `git clean -fxd` in the repository, and start over from step 9. | 36 | In that case, you can remove the projects from Eclipse, run `git clean -fxd` in the repository, and start over from step 9. |
diff --git a/gradle/java-common.gradle b/gradle/java-common.gradle index a070c378..daacecd3 100644 --- a/gradle/java-common.gradle +++ b/gradle/java-common.gradle | |||
@@ -5,8 +5,8 @@ repositories { | |||
5 | } | 5 | } |
6 | } | 6 | } |
7 | 7 | ||
8 | sourceCompatibility = '11' | 8 | sourceCompatibility = '17' |
9 | targetCompatibility = '11' | 9 | targetCompatibility = '17' |
10 | 10 | ||
11 | tasks.named('jar') { | 11 | tasks.named('jar') { |
12 | manifest { | 12 | manifest { |
diff --git a/gradle/xtend.gradle b/gradle/xtend.gradle index 900a95f2..8875465b 100644 --- a/gradle/xtend.gradle +++ b/gradle/xtend.gradle | |||
@@ -9,6 +9,12 @@ sourceSets { | |||
9 | } | 9 | } |
10 | } | 10 | } |
11 | 11 | ||
12 | xtend.generator { | ||
13 | // As of Xtext 2.26.0.M2, the Xbase compiler doesn't know how to handle Java 12 and up | ||
14 | // and the build fails with a NullPointerException if such Java version is specified. | ||
15 | javaSourceLevel = '11' | ||
16 | } | ||
17 | |||
12 | tasks.named('clean') { | 18 | tasks.named('clean') { |
13 | delete 'src/main/xtend-gen' | 19 | delete 'src/main/xtend-gen' |
14 | delete 'src/test/xtend-gen' | 20 | delete 'src/test/xtend-gen' |
diff --git a/language-model/META-INF/MANIFEST.MF b/language-model/META-INF/MANIFEST.MF index 66bc6985..09c64310 100644 --- a/language-model/META-INF/MANIFEST.MF +++ b/language-model/META-INF/MANIFEST.MF | |||
@@ -3,11 +3,11 @@ Bundle-ManifestVersion: 2 | |||
3 | Bundle-Name: %pluginName | 3 | Bundle-Name: %pluginName |
4 | Bundle-SymbolicName: language-model;singleton:=true | 4 | Bundle-SymbolicName: language-model;singleton:=true |
5 | Automatic-Module-Name: language-model | 5 | Automatic-Module-Name: language-model |
6 | Bundle-Version: 0.1.0.qualifier | 6 | Bundle-Version: 0.0.0.qualifier |
7 | Bundle-ClassPath: . | 7 | Bundle-ClassPath: . |
8 | Bundle-Vendor: %providerName | 8 | Bundle-Vendor: %providerName |
9 | Bundle-Localization: plugin | 9 | Bundle-Localization: plugin |
10 | Bundle-RequiredExecutionEnvironment: JavaSE-11 | 10 | Bundle-RequiredExecutionEnvironment: JavaSE-17 |
11 | Export-Package: org.eclipse.viatra.solver.language.model.problem, | 11 | Export-Package: org.eclipse.viatra.solver.language.model.problem, |
12 | org.eclipse.viatra.solver.language.model.problem.impl, | 12 | org.eclipse.viatra.solver.language.model.problem.impl, |
13 | org.eclipse.viatra.solver.language.model.problem.util | 13 | org.eclipse.viatra.solver.language.model.problem.util |