Skip to content

TESTAR iv4xr compilation

Fernando Pastor edited this page Nov 21, 2022 · 8 revisions

TESTAR_iv4XR software can be built with Gradle.
It is possible to use Gradle tasks outside an IDE to compile and launch TESTAR or to use an IDE such as Eclipse or IntelliJ to import, develop, compile and execute TESTAR.

TESTAR_iv4xr project installation video

Gradle tasks

gradlew is the instruction to use the Gradle wrapper.

TESTAR downloads Gradle wrapper dependencies into the system and uses it to compile the project. The Gradle version is indicated inside the file TESTAR_dev\gradle\wrapper\gradle-wrapper.properties

Gradle build

gradlew build task: is configured to compile TESTAR project at Java level for error and warning checking.

Gradle distZip

gradlew distZip task: prepares a distributed zip version of TESTAR inside testar\target\distributions\testar.zip

Gradle installDist

gradlew installDist task: prepares a compiled version of TESTAR ready for launching inside testar\target\install\testar\bin

These tasks will also execute downloadAndUnzipLabRecruits task: to download the LabRecruits game from github LabRecruits.

Import Gradle project into Eclipse (similar to other IDEs with Gradle)

  1. Create a new empty workspace for Eclipse in a folder that is not the folder that contains the source code.
  2. Select File -> Import to open the import dialog
  3. Select Gradle -> Existing Gradle project to open the import dialog
  4. Select the folder that contains the root of the source code and start the import

Running TESTAR within IDE

After importing the project into the desired IDE, it is possible to execute TESTAR from the IDE.

  1. Execute the debuggingDistribution task from the group distribution_iv4XR
    2a. Launch the testar\org\fruit\monkey\Main.java class as a Java application
    2b. For IntelliJ (not Eclipse), the user needs to change the launching directory to TESTAR_iv4xr\testar

windows.dll (Allows TESTAR execution on Windows)

TESTAR uses the windows.dll library to make calls to the Windows systems.

By default, there is a windows.dll inside the \testar\resources\windows10\ directory, which is copied when we create a default distributed version, avoiding creating a new windows.dll in each compilation.

If we add or modify functionality on the interaction with Windows environments, we will need to compile a new windows.dll instead of copying the current version.

Clone this wiki locally