Skip to content
This repository has been archived by the owner on Dec 25, 2024. It is now read-only.

How to build the project

Johan von Forstner edited this page Mar 9, 2015 · 29 revisions

Checking out the source code

$ git clone https://github.com/raphaelm/opacclient.git opacclient
$ cd opacclient/

You can also do this directly from Android Studio.

Import project in Android Studio

We assume you have an Android Studio installation ready to use.

  1. Start Android Studio and choose 'Open an existing Android Studio project'
  2. Select the folder opacclient inside the repository you just cloned
  3. Start coding!

Should work. If not, play around or email us at [email protected]. Happy hacking!

Build with gradle

$ ./gradlew assembleDebug

Running the Unit Tests

The Unit Tests connect to all supported libraries and run some basic tests to ensure that the API classes work as intended. Because of the high number of libraries, running the Unit Tests will take quite a long time, and some of them will fail because of unreachable library servers. To run the Unit Tests, follow these steps:

  1. Click on the Run -> Edit Configurations... menu entry in Android Studio
  2. Add a new Run configuration of the JUnit type
  3. Set the name of the new run configuration to tests
  4. Set Use classpath of module to tests
  5. Set the Class to de.geeksfactory.opacclient.tests.apitests.LibraryApiTestCases
  6. Click OK to close the Run configurations window and run the Unit Tests using the tests configuration

Running the MeaningDetector Tool

The MeaningDetector tool connects to all supported libraries, calls the OpacApi.getSearchFields() function and tries to detect the meaning of all search fields using the MeaningDetector.detectMeaning(SearchField) function. If this fails, it will prompt the user to enter the correct meaning for the search field and the tool will change the configuration files in the opacapp\src\main\assets\meanings directory accordingly. To run this tool, follow these steps:

  1. Click on the Run -> Edit Configurations... menu entry in Android Studio
  2. Add a new Run configuration of the Application type
  3. Set the name of the new run configuration to meaningdetector
  4. Set Use classpath of module to meaningdetector
  5. Set the Main class to de.geeksfactory.opacclient.meanings.Main
  6. Click OK to close the Run configurations window and run the tool using the meaningdetector configuration
Clone this wiki locally