An app for epfl students to enhance their food experience
Name | Github | |
---|---|---|
John Taylor | JohnTomasTaylor | [email protected] |
Dayan Massonnet | dayan9265 | [email protected] |
Daniel Bucher | bu-da | [email protected] |
Haolong Li | Tachi-67 | [email protected] |
Pau Romeu | pauromeu | [email protected] |
Nino Gerber | nino-gerb | [email protected] |
This project depends on a specific release of the Jacoco library, which has been updated to provide coverage support for Jetpack Compose. This release is available on GitHub, and requires the use of the GitHub Apache Maven Package Repository. Therefore, you are required to add the following to your ~/.gradle/gradle.properties
file to access the Maven package.
githubJacocoUsername=YourGitHubUsername
# Requires at least the read:packages scope.
githubJacocoPassword=YourGitHubPersonalAccessToken
To create the a personal access token go to your github profile and to Settings / Developer Settings / Tokens (classic). Click on generate new token (classic). Then add a note, expiration date and click on read:packages. Then replace the placeholder with the generated token.
As this project uses Google Firebase, you will also need to provide your own google-services.json. This file can be generated from the Firebase Console (Project -> Project Settings -> Your apps -> SDK setup and configuration -> google-services.json). It must be placed at ./app/google-services.json.
firebase emulator is used for some tests. To install it run the following: curl -sL https://firebase.tools | bash
. To run the tests in android studio execute: firebase emulators:start
. To run the tests as well as other checks on the cli execute firebase emulators:exec './gradlew check connectedCheck'
.
As this project integrates Google Maps, a Google Maps API key is needed and needs to be added to the local.properties file. It can be downloaded here.
MAPS_API_KEY=KEYVALUE
The project also uses an external chat service, a chat API key is needed to be added to the local.properties file. It can be downloaded here
CHAT_API_KEY=KEYVALUE
If there is an error : android.experimental.testOptions.emulatorSnapshots.maxSnapshotsForTestFailures=0' is experimental. You can put the following into your gradle properties:
android.useNewApkCreator=true
In the CI pipeline we use two static code analysis tools:
- detekt, can be triggered with
./gradlew detekt
- Android Studio lint, can be triggered with
./gradlew lintDebug
It's recommended to run these two commands locally before pushing a commit or creating a pull request, because the ci is slower. To automatically fix formatting errors discovered by detekt run ./gradlew ktlintFormat
.
This project uses Jetpack Compose and is written in Kotlin. The main packages are organized as follows:
ch.epfl.sdp.cook4me.persistence.repository
contains the repositories (classes which take care of the database access). All the classes have the prefixRepository
;ch.epfl.sdp.cook4me.persistence.model
contains model classes, which represent the stored format;ch.epfl.sdp.mobile.application
contains the business logic. All the classes have the postfixService
;ch.epfl.sdp.mobile.ui
contains the user interface (where all the@Composable
functions live);