Skip to content

Repository Structure

Paul Bredl edited this page Jul 30, 2024 · 5 revisions

DinoDev is separated into multiple repositories:

  1. dinodev_frontend contains the frontend code of DinoDev
  2. dinodev_backend contains the backend server
  3. dinodev (this repository) serves as wrapper for the backend and frontend. It also contains documentation
  4. dinodev_common contains common code for the DinoDev repositories, mostly the interfaces for the adapters.
  5. dinodev_gamification_engine contains the gamification engine, which is responsible for executing game rules on incoming events
  6. dinodev_gropius_adapter contains the adapter for the Gropius API.
  7. dinodev_github_adapter contains the adapter for reacting to GitHub events.

The backend further depends on meitrex_common and meitrex_common_test.

The following graph schematically shows the dependencies between the repositories, omitting transitive dependencies:

graph TD
    C[dinodev] --> A[dinodev_frontend]
    C --> B[dinodev_backend]
    D --> E[dinodev_gamification_engine]
    B --> F[dinodev_gropius_adapter]
    B --> G[dinodev_github_adapter]
    D --> H[meitrex_common]
    E --> I[meitrex_common_test]
    F --> D[dinodev_common]
    G --> D
    I --> H

Loading

Updating Gradle dependencies between repositories

The backend uses gradle to use dependent code from other repositories. To update the dependencies, the following steps are necessary:

  1. Push the new version of the dependent repository to GitHub
  2. Create a new release on GitHub
  3. Update the version in the build.gradle file of the dependent repository

This has to be done for all dependent repositories, even transitive ones. This unfortunately means that when having a new version of meitrex_common, the version in meitre_common_test and ALL dinodev backend repositories have to be updated.

When in a longer development phase, it is recommended to use the main branch of the dependent repositories in the build.gradle file. This can be done by using the following code snippet:

dependencies {
    implementation(<dependency name>) {
        version {
            branch = 'main'
        }
    }
}

This reduces the amount of required updates significantly, as the version is always the latest commit on the main branch. However, this will not work when deploying with docker.

Clone this wiki locally