Building » History » Revision 2
Revision 1 (Sergey Smolov, 12/05/2019 07:12 PM) → Revision 2/7 (Sergey Smolov, 12/20/2019 02:37 PM)
h1. Building {{toc}} h2. Prerequisites To build the _Fortress_ library from sources, following components must be installed: # *Git* # *Java Development Kit (JDK) 1.8* or higher For project building and JUnit tests running we use " *Gradle* ":http://gradle.org system. You can either "Gradle":http://gradle.org/. Please install it, or use wrapper scripts it first (we use "Gradle 4.10.3":https://docs.gradle.org/4.10.3/release-notes.html in scripts). Two Gradle the 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. 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 Fortress 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 script, by Git *gradle-local.properties* file of the following format: <pre> repoUser=<write your login here> repoPassword=<write your password here> </pre> way). h2. Get the project source code Clone the project's Git repository <pre><code class="shell"> git clone --recursive https://forge.ispras.ru/git/solver-api.git fortress cd fortress </code></pre> h2. Building and running 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 and running from Eclipse IDE # Install "Buildship":https://marketplace.eclipse.org/content/buildship-gradle-integration Gradle integration plugin for Eclipse IDE (if Gradle support has not provided by the IDE already). # Create @init.gradle@ file in the $HOME/.gradle directory and write the following to it: <pre> allprojects { apply plugin: 'eclipse' it.eclipse { classpath.downloadJavadoc = true } } </pre> # Import Retrascope sources into Eclipse workspace: * Use the menu item "File/Import...". * Choose "Gradle/Gradle Project". * Select the "retrascope" directory as the root directory, press "Next". * Select the "Gradle wrapper (recommended)" import option. * Press the "Finish" button: the project will be opened in the Eclipse IDE.