Building » History » Version 7
Sergey Smolov, 01/22/2020 03:33 PM
1 | 1 | Sergey Smolov | h1. Building |
---|---|---|---|
2 | |||
3 | 6 | Sergey Smolov | h2. Prerequisite |
4 | |||
5 | 7 | Sergey Smolov | To build the _Verilog Translator_ tool from sources, following components must be installed: |
6 | # *Git* |
||
7 | # *Java Development Kit (JDK) 1.11* or higher (use "AdoptOpenJDK":https://adoptopenjdk.net/ for Windows and *openjdk-11-jdk* for Ubuntu Linux based OS) |
||
8 | 1 | Sergey Smolov | |
9 | 7 | Sergey Smolov | For project building we use " *Gradle* ":http://gradle.org system. |
10 | You can either install it, or use wrapper scripts (we use "Gradle 4.10.3":https://docs.gradle.org/4.10.3/release-notes.html in scripts). |
||
11 | |||
12 | 1 | Sergey Smolov | h2. Getting project source code |
13 | |||
14 | 5 | Sergey Smolov | Clone the project Git repository and it's submodules: |
15 | 2 | Sergey Smolov | <pre> |
16 | 1 | Sergey Smolov | $ git clone --recursive https://forge.ispras.ru/git/veritrans.git |
17 | </pre> |
||
18 | |||
19 | h2. Building and running Verilog Translator from command line |
||
20 | |||
21 | 7 | Sergey Smolov | Two Gradle wrapper scripts are included in the project repository: one for Linux-based OS (*gradlew*), another for Windows OS (*gradlew.bat*). To make the guide uniform, a "gradle" acronym will be used in the following examples. |
22 | 1 | Sergey Smolov | |
23 | To compile main classes run: |
||
24 | <pre> |
||
25 | gradle classes |
||
26 | </pre> |
||
27 | To compile test classes run: |
||
28 | <pre> |
||
29 | gradle testClasses |
||
30 | </pre> |
||
31 | To run all unit tests run: |
||
32 | <pre> |
||
33 | gradle test |
||
34 | </pre> |
||
35 | 4 | Sergey Smolov | _NOTE : to list all Gradle commands run:_ |
36 | 1 | Sergey Smolov | <pre> |
37 | gradle tasks |
||
38 | </pre> |
||
39 | |||
40 | h2. Building and running Verilog Translator from Eclipse IDE |
||
41 | |||
42 | # Install "Buildship":https://marketplace.eclipse.org/content/buildship-gradle-integration Gradle integration plugin for Eclipse IDE. |
||
43 | # Create @init.gradle@ file in the $HOME/.gradle directory and write the following to it: |
||
44 | <pre> |
||
45 | allprojects |
||
46 | { |
||
47 | apply plugin: 'eclipse' |
||
48 | |||
49 | it.eclipse |
||
50 | { |
||
51 | classpath.downloadJavadoc = true |
||
52 | } |
||
53 | } |
||
54 | </pre> |
||
55 | # Import Verilog Translator's sources into Eclipse workspace: |
||
56 | * Use the menu item "File/Import...". |
||
57 | * Choose "Gradle/Gradle Project". |
||
58 | * Select the "veritrans" directory as the root directory, press "Next". |
||
59 | * Select the "Gradle wrapper (recommended)" import option. |
||
60 | * Press the "Finish" button: the project will be opened in the Eclipse IDE. |