Building » History » Version 15
Sergey Smolov, 02/01/2020 02:51 PM
1 | 1 | Sergey Smolov | h1. Building |
---|---|---|---|
2 | |||
3 | 11 | Sergey Smolov | {{toc}} |
4 | 1 | Sergey Smolov | |
5 | 11 | Sergey Smolov | h2. Prerequisites |
6 | 1 | Sergey Smolov | |
7 | 11 | Sergey Smolov | To build the @Retrascope@ tool from sources, following components must be installed: |
8 | # *Git* |
||
9 | # *Java Development Kit (JDK) 1.11* (use "AdoptOpenJDK":https://adoptopenjdk.net/ for Windows and *openjdk-11-jdk* for Ubuntu Linux based OS) |
||
10 | |||
11 | For project building we use "*Gradle*":http://gradle.org system. |
||
12 | 15 | Sergey Smolov | You can either install it, or use wrapper scripts (we use "Gradle 5.0":https://docs.gradle.org/5.0/release-notes.html in scripts). |
13 | 11 | 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 common guide, "gradle" acronym will be used in the following examples. |
14 | |||
15 | h3. Access to Nexus |
||
16 | |||
17 | 12 | Sergey Smolov | For some cases an access to "ISP RAS Nexus":https://forge.ispras.ru/nexus local repository server may be required via @Retrascope@ building. Ask your ISP RAS colleagues for login and password and store them either in @_REPO_USER@ and @_REPO_PASSWORD@ environment variables, or in non-versioned by Git *gradle-local.properties* file of the following format: |
18 | 1 | Sergey Smolov | <pre> |
19 | 11 | Sergey Smolov | repoUser=<write your login here> |
20 | repoPassword=<write your password here> |
||
21 | 1 | Sergey Smolov | </pre> |
22 | 11 | Sergey Smolov | |
23 | h2. Get the project source code |
||
24 | |||
25 | Clone the project's Git repository |
||
26 | <pre><code class="shell"> |
||
27 | git clone --recursive https://forge.ispras.ru/git/retrascope.git |
||
28 | cd retrascope |
||
29 | </code></pre> |
||
30 | |||
31 | h2. Building from command line |
||
32 | |||
33 | 1 | Sergey Smolov | To list all Gradle commands run: |
34 | 11 | Sergey Smolov | <pre><code class="shell"> |
35 | 1 | Sergey Smolov | gradle tasks |
36 | 11 | Sergey Smolov | </code></pre> |
37 | 1 | Sergey Smolov | |
38 | 11 | Sergey Smolov | To compile both main and test classes run: |
39 | <pre><code class="shell"> |
||
40 | gradle assemble |
||
41 | </code></pre> |
||
42 | 10 | Sergey Smolov | |
43 | 11 | Sergey Smolov | To run all unit tests run: |
44 | <pre><code class="shell"> |
||
45 | gradle test |
||
46 | </code></pre> |
||
47 | |||
48 | |||
49 | h2. Building from "Eclipse IDE":https://www.eclipse.org/ide/ |
||
50 | |||
51 | 10 | Sergey Smolov | * Generate the Eclipse IDE project and classpath files with "Gradle":https://gradle.org: |
52 | 13 | Sergey Smolov | <pre>gradle eclipse</pre> |
53 | 10 | Sergey Smolov | * Create a workspace located in the directory with @retrascope@ |
54 | 8 | Sergey Smolov | - Use the menu item @File/Switch Workspace...@ |
55 | 10 | Sergey Smolov | - Browse the directory |
56 | 8 | Sergey Smolov | * Import an existing project called @retrascope@ into the workspace |
57 | - Use the menu item @File/Import...@ |
||
58 | 10 | Sergey Smolov | - Choose @General/Existing Projects into Workspace@ |
59 | 8 | Sergey Smolov | - Select the @retrascope@ folder as the root directory |
60 | 1 | Sergey Smolov | - Select the @retrascope@ project located in this directory |
61 | - Press the @Finish@ button |
||
62 | |||
63 | 11 | Sergey Smolov | h2. Building from "IntelliJ IDEA":https://www.jetbrains.com/idea/ |
64 | 1 | Sergey Smolov | |
65 | 11 | Sergey Smolov | # From Welcome menu select "Import project". |
66 | # Select @retrascope@ directory, then press "OK". |
||
67 | 14 | Sergey Smolov | # From "Import project" menu select "Import project from external model" -> "Gradle", then press "Finish". |