Project

General

Profile

Building » History » Revision 11

Revision 10 (Sergey Smolov, 01/11/2020 04:34 PM) → Revision 11/16 (Sergey Smolov, 01/22/2020 04:33 PM)

h1. Building 

 {{toc}} 

 h2. Prerequisites 

 To The project 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 system is based OS) 

 For project building we use "*Gradle*":http://gradle.org system.  
 You can on "Gradle":http://gradle.org/. Please either install it, it first or use wrapper scripts script (we use "Gradle 4.10.3":https://docs.gradle.org/4.10.3/release-notes.html in scripts). the wrapper, by the way). 
 Two Gradle wrapper scripts are included in the project repository: one For Windows OS @gradlew.bat@ script should be used, for Linux-based OS (*gradlew*), another for Windows OS (*gradlew.bat*). To make the common guide, "gradle" acronym will @gradlew@ script should be used in the following examples. used. 

 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 From command line 

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

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

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


 </pre> 
 To list all Gradle commands run: 
 <pre> 
 gradle tasks 
 </pre> 

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

 * Generate the Eclipse IDE project and classpath files with "Gradle":https://gradle.org: 
   <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 From "IntelliJ IDEA":https://www.jetbrains.com/idea/ 

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