diff --git a/README.md b/README.md index a8db6167..d7519d67 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ - -
- - - - - - - - - - - - - - - -
- -+
+ +Features | Download | Contribute | @@ -41,18 +35,22 @@ ![Banner](apps/onyx/assets/screenshots/banner_en.png) - -Onyx is an unofficial, open-source application that lets you access all Université Claude Bernard Lyon 1 services from your phone. +Onyx is an unofficial, open-source application that lets you access all Université Claude Bernard Lyon 1 services from +your phone. ## Features -
- +
+ + + + +
## Download -+
@@ -67,28 +65,66 @@ We really appreciate any help. You can also chat with us on [Discord](https://di ## Build -### Run the integration test +To build the app, follow these steps: + +### Prerequisites 🛠️ + +- Install Flutter from [flutter.dev](https://flutter.dev). +- Note: If you intend to build for Linux, ensure you have the libsecret library installed in your development + environment. + +### Building the App 🏗️ + +Please make sure you are on the main branch before proceeding with the build process. +Navigate to the `apps/onyx` directory and execute the following command based on your +target platform: + +- To build an APK: `flutter build apk --profile` (the `--profile` flag build the app without the signing key but with + full optimizations) + - The APK file is located at `apps/onyx/build/app/outputs/flutter-apk/app-release.apk`. +- To build for Linux: `flutter build linux` + - The Linux build is located at `apps/onyx/build/linux/x64/release/bundle/Onyx`. +- To build an app bundle: `flutter build appbundle --profile` (the `--profile` flag build the app without the signing + key but with full optimizations) + - The app bundle is located at `apps/onyx/build/app/outputs/bundle/release/app-release.aab`. +- For other platforms, please refer to the Flutter documentation for their respective build locations. + +### Development Environment Setup ⚙️ -Start app in test mode : `flutter run integration_test/app_test.dart --host-vmservice-port 9753 --disable-service-auth-codes --dart-define CONVENIENT_TEST_MANAGER_HOST="an ip address" --dart-define CONVENIENT_TEST_APP_CODE_DIR=/path/to/onyx`. +To set up your development environment: -Replace `an ip address` with the ip address of your computer (if using an emulator, set to 10.0.2.2). -Replace `/path/to/onyx` with the path to the onyx directory. +1. The required libraries are located in the `packages/` directory. +2. Install Melos, which handles linking libraries directly in the app for development: + - Install Melos by running: `dart pub global activate melos`. + - Refer to the [Melos documentation](https://melos.invertase.dev/) for more details. +3. Run `melos bs` or `melos bootstrap` to link the local libraries in the app and retrieve all dependencies. +4. Navigate to the `apps/onyx` directory and run `flutter clean` to ensure a clean environment. +5. Run `flutter run` to start the app. +6. Optionally, you can use `melos generate` to generate automatically generated files (usually not needed unless you + modify them). +7. Run `melos test` to run unit tests for all the libraries. +8. Run `melos analyze` to perform static analysis on the libraries and the Onyx app. +9. To unlink everything, use `melos clean`. -Run the test manager (can be found here : https://github.com/fzyzcjy/flutter_convenient_test/) -`flutter run packages/convenient_test_manager/lib/main.dart --profile --dart-define CONVENIENT_TEST_WORKER_HOST="an ip address" -d linux`. +### End-to-End Testing 🧪 -Replace `an ip address` with the ip address of your phone (if using an emulator, set to 127.0.0.1). +To run end-to-end tests: -Replace `linux` with your operating system. +1. Install Maestro by following the [Maestro documentation](https://maestro.mobile.dev/). +2. Run the following command to install Maestro: `curl -Ls "https://get.maestro.mobile.dev" | bash` (Applicable for Mac + OS, Linux, or Windows with WSL) +3. Navigate to the `apps/onyx/integration_test` directory. + 4. After installing the app on an Android device (physical or virtual), run the following command to execute the + tests: `maestro test general_test.yaml` Maestro will automatically run the tests. -Common issue : -- You will maybe need to install vlc-dev on linux to be able to compile the test manager. -- Enable isolation in the test manager to run all the tests at once. +Now, you're all set to build and test your Flutter app. 🎉 ## License -This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.\ +This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License. To view a copy of +this license, visit http://creativecommons.org/licenses/by-nc/4.0/ or send a letter to Creative Commons, PO Box 1866, +Mountain View, CA 94042, USA.\ -
+
diff --git a/apps/onyx/README.md b/apps/onyx/README.md deleted file mode 100644 index 32f24cf0..00000000 --- a/apps/onyx/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# Onyx - -Onyx is an application to access all lyon1's services from your phone.\ - -| | | -|:------------------------------------------------------------------------:|:------------------------------------------------------------------------:| -| Toutes tes notes en un clin d'oeil⚡ | Ton emploi du temps sans rien à configurer 🥳 | -| ![](assets/screen_shot/Screenshot_20230221-155049_Onyx.png){width="50%"} | ![](assets/screen_shot/Screenshot_20230221-155102_Onyx.png){width="50%"} | -| Tes mails toujours disponible 🤩 | Plein de paramètres une application comme tu la veut ❤️🔥 | -| ![](assets/screen_shot/Screenshot_20230221-155151_Onyx.png){width="50%"} | ![](assets/screen_shot/Screenshot_20230221-155154_Onyx.png){width="50%"} | -| Izly tu peut supprimer l'app Izly🧹 | Un plan des bâtimens pour cet amphi que personne connait😢 | -| ![](assets/screen_shot/Screenshot_20230221-155123_Onyx.png){width="50%"} | ![](assets/screen_shot/Screenshot_20230221-155158_Onyx.png){width="50%"} | - -## contribute - -Feel free to contribute to this project by opening issues or pull requests.\ -We really appreciate any help. - -### run the integration test - -start app in test -mode : `flutter run integration_test/app_test.dart --host-vmservice-port 9753 --disable-service-auth-codes --dart-define CONVENIENT_TEST_MANAGER_HOST="an ip address" --dart-define CONVENIENT_TEST_APP_CODE_DIR=/path/to/onyx` - -replace `an ip address` with the ip address of your computer (if using an emulator, set to 10.0.2.2) -replace `/path/to/onyx` with the path to the onyx directory - -run the test manager (can be found here : https://github.com/fzyzcjy/flutter_convenient_test/) -`flutter run packages/convenient_test_manager/lib/main.dart --profile --dart-define CONVENIENT_TEST_WORKER_HOST="an ip address" -d linux` - -replace `an ip address` with the ip address of your phone (if using an emulator, set to 127.0.0.1) - -replace `linux` with your operating system - -common issue : - -- you will maybe need to install vlc-dev on linux to be able to compile the test manager -- enable isolation in the test manager to run all the tests at once - -tips: -to list all the directories in map : - -```bash -find -depth -type d | awk -F / 'NF>=p; {p=NF}' | sed 's/.//' | xargs -I{} echo " - assets/map{}/" -``` - -## licence - -This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License. To view a copy of -this license, visit http://creativecommons.org/licenses/by-nc/4.0/ or send a letter to Creative Commons, PO Box 1866, -Mountain View, CA 94042, USA.\ - \ No newline at end of file diff --git a/apps/onyx/README.md.backup b/apps/onyx/README.md.backup deleted file mode 100644 index a92c7f1f..00000000 --- a/apps/onyx/README.md.backup +++ /dev/null @@ -1,42 +0,0 @@ -# Onyx - -Onyx is an application to access all lyon1's services from your phone.\ - -||| -|:-:|:-:| -|Toutes tes notes en un clin d'oeil⚡|Ton emploi du temps sans rien à configurer 🥳| -|![](assets/screen_shot/Screenshot_20230221-155049_Onyx.png){width="50%"}|![](assets/screen_shot/Screenshot_20230221-155102_Onyx.png){width="50%"}| -|Tes mails toujours disponible 🤩|Plein de paramètres une application comme tu la veut ❤️🔥| -|![](assets/screen_shot/Screenshot_20230221-155151_Onyx.png){width="50%"}|![](assets/screen_shot/Screenshot_20230221-155154_Onyx.png){width="50%"}| -|Izly tu peut supprimer l'app Izly🧹|Un plan des bâtimens pour cet amphi que personne connait😢| -|![](assets/screen_shot/Screenshot_20230221-155123_Onyx.png){width="50%"}|![](assets/screen_shot/Screenshot_20230221-155158_Onyx.png){width="50%"}| - -## contribute - -Feel free to contribute to this project by opening issues or pull requests.\ -We really appreciate any help. - -### run the integration test - -start app in test -mode : `flutter run integration_test/app_test.dart --host-vmservice-port 9753 --disable-service-auth-codes --dart-define CONVENIENT_TEST_MANAGER_HOST="an ip address" --dart-define CONVENIENT_TEST_APP_CODE_DIR=/path/to/onyx` - -replace `an ip address` with the ip address of your computer (if using an emulator, set to 10.0.2.2) -replace `/path/to/onyx` with the path to the onyx directory - -run the test manager (can be found here : https://github.com/fzyzcjy/flutter_convenient_test/) -`flutter run packages/convenient_test_manager/lib/main.dart --profile --dart-define CONVENIENT_TEST_WORKER_HOST="an ip address" -d linux` - -replace `an ip address` with the ip address of your phone (if using an emulator, set to 127.0.0.1) - -replace `linux` with your operating system - -common issue : - -- you will maybe need to install vlc-dev on linux to be able to compile the test manager -- enable isolation in the test manager to run all the tests at once - -## licence - -This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.\ - \ No newline at end of file