Project

General

Profile

Building » History » Revision 13

Revision 12 (Sergey Smolov, 01/22/2020 04:36 PM) → Revision 13/16 (Sergey Smolov, 01/22/2020 04:44 PM)

h1. Building 

 {{toc}} 

 h2. Prerequisites 

 To build the @Retrascope@ tool from sources, following components must be installed: 
 # *Git* 
 # *Java Development Kit (JDK) 1.11* (use "AdoptOpenJDK":https://adoptopenjdk.net/ for Windows and *openjdk-11-jdk* for Ubuntu Linux based OS) 

 For project building we use "*Gradle*":http://gradle.org system.  
 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). 
 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. 

 h3. Access to Nexus 

 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: 
 <pre> 
 repoUser=<write your login here> 
 repoPassword=<write your password here> 
 </pre> 

 h2. Get the project source code 

 Clone the project's Git repository 
 <pre><code class="shell"> 
 git clone --recursive https://forge.ispras.ru/git/retrascope.git 
 cd retrascope 
 </code></pre> 

 h2. Building from command line 

 To list all Gradle commands run: 
 <pre><code class="shell"> 
 gradle tasks 
 </code></pre> 

 To compile both main and test classes run: 
 <pre><code class="shell"> 
 gradle assemble 
 </code></pre> 

 To run all unit tests run: 
 <pre><code class="shell"> 
 gradle test 
 </code></pre> 


 h2. Building from "Eclipse IDE":https://www.eclipse.org/ide/ 

 * Generate the Eclipse IDE project and classpath files with "Gradle":https://gradle.org: 
   <pre>gradle <pre>$ ./gradlew eclipse</pre> 
 * Create a workspace located in the directory with @retrascope@ 
   - Use the menu item @File/Switch Workspace...@ 
   - Browse the directory 
 * Import an existing project called @retrascope@ into the workspace 
   - Use the menu item @File/Import...@ 
   - Choose @General/Existing Projects into Workspace@ 
   - Select the @retrascope@ folder as the root directory 
   - Select the @retrascope@ project located in this directory 
   - Press the @Finish@ button 

 h2. Building from "IntelliJ IDEA":https://www.jetbrains.com/idea/ 

 # From Welcome menu select "Import project". 
 # Select @retrascope@ directory, then press "OK". 
 # From "Import project" menu select "Import project from external model" -> Gradle, then press "Finish".