Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .env.template

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,6 @@ config/
keys

MainActivity.kt
android/build/reports/problems/problems-report.html

.env
.env
88 changes: 49 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
# Titan

Titan is a cross platform frontend written in Flutter for an open-source project launched by ÉCLAIR, the computer science association of Ecole Centrale de Lyon. This project aims to provide students of business and engineering schools a digital tool to simplify the association process.
Titan is a cross platform frontend written in Flutter for an open-source project launched by ÉCLAIR and maintained by ProximApp. This project aims to provide students of business and engineering schools a digital tool to simplify campus life and student association activities.

Our builds of Titan are called MyECL and can be downloaded from the App Store and from the Google Play Store.
## Flavors

## Setup environment
Titan supports [flavors](https://docs.flutter.dev/deployment/flavors), which allows the developer to easily switch between several versions of Titan for several use cases.

Titan includes 3 flavors: `dev`, `alpha`, `prod`. On VSCode, you can choose which flavor to use when launching the debugger

Each flavor is associated with a specific app package name (`*.titan.dev`, `*.titan.alpha`, `*.titan`) allowing the three app to be installed simultaneously on the same device.

## Base configuration

You need to create config json files with required variables:

- config/config-dev.json
- config/config-alpha.json
- config/config-prod.json

## Development

### Setup dev environment

Install Flutter:
https://docs.flutter.dev/get-started/install
Expand All @@ -14,19 +30,15 @@ https://docs.flutter.dev/get-started/editor?tab=vscode

Titan is designed to be launched on Web, Android and iOS platforms.

## Configure Titan

Update [`.env`](.env) to match your Hyperion's backend:
### Run Titan

`PROD_HOST = "<<Your Production Server Host>>`

You can also specify an other host for debuging:

`DEV_HOST = "<<Your Debbuging Server Host>>`
```bash
flutter run --flavor dev --dart-define-from-file=config/config-dev.json --web-port 3000
# flutter run --flavor alpha --dart-define-from-file=config/config-alpha.json --web-port 3000
# flutter run --flavor prod --dart-define-from-file=config/config-prod.json --web-port 3000
```

NB: a trailing slash is required.

## Development
Titan can be launched from VS Code _Run and Debug_ menu.

### Formatting

Expand Down Expand Up @@ -76,27 +88,7 @@ To run a specific test file :
flutter test --flavor dev path/to/file.dart
```

### Flavors

Titan supports [flavors](https://docs.flutter.dev/deployment/flavors), which allows to easily switch between several versions of Titan for several use cases.

Titan includes 3 flavors: `dev`, `alpha`, `prod`. On VSCode, you can choose which flavor to use when launching the debugger

Each flavor is associated with a specific app package name (`fr.myecl.titan.dev`, `fr.myecl.titan.alpha`, `fr.myecl.titan`) allowing the three app to be installed on the same device. Each flavor use its own Hyperion url defined in the [dotenv](/.env)

#### Build with a flavor

To build Titan with a specific flavor use:

```
flutter build {target} --flavor={flavor}
```

Currently flavor are not supported for Flutter for web, you should use:

```
flutter build web --dart-define=flavor={flavor}
```
## Advanced Configuration

### Notifications setup

Expand All @@ -118,8 +110,13 @@ For iOS, add your `GoogleService-Info.plist` in `ios/config/<flavor/`.

### Allows non SSL connexion to use a custom local Hyperion backend

<details>
<summary>

On mobile, using plaintext HTTP connexions may raise issues.

</summary>

#### Android

Update [AndroidManifest.xml](./android/app/src/debug/AndroidManifest.xml):
Expand Down Expand Up @@ -155,11 +152,13 @@ Update [Info.plist](ios/Runner/Info.plist):
</dict>
```

</details>

### Update Titan's icon

First update the icon's file and update [pubspec.yaml](./pubspec.yaml).

Then, `flutter_launcher_icons` must be updated:
Then run `flutter_launcher_icons` to generate all variants of the icon:

```bash
flutter pub get
Expand All @@ -171,16 +170,27 @@ flutter pub run flutter_launcher_icons
[Guided upgrade using Android Studio](https://docs.flutter.dev/release/breaking-changes/android-java-gradle-migration-guide#solution-1-guided-fix-using-android-studio)
[Java and Gradle compatibility](https://docs.gradle.org/current/userguide/compatibility.html)

# Configuring fastlane
## Building using Fastlane

### Fastlane configuration

For automated signature and upload, you need to provide the following keys:

Google service account
- Google service account

```
android/fastlane-service-account.json
```

Apple
- Apple App Store Connect API key

```
ios/app-store-connect-api.p8
```

### Build and upload a version

```bash
cd ios # or android
bundle exec fastlane beta flavor:alpha # or prod or dev
```
2 changes: 2 additions & 0 deletions android/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ source "https://rubygems.org"
gem "abbrev"
gem "fastlane"
gem "ostruct"

gem "nkf"
2 changes: 2 additions & 0 deletions android/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ GEM
mutex_m (0.3.0)
nanaimo (0.4.0)
naturally (2.3.0)
nkf (0.2.0)
optparse (0.8.0)
os (1.1.4)
ostruct (0.6.1)
Expand Down Expand Up @@ -227,6 +228,7 @@ PLATFORMS
DEPENDENCIES
abbrev
fastlane
nkf
ostruct

BUNDLED WITH
Expand Down
20 changes: 10 additions & 10 deletions ios/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ GEM
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
addressable (2.8.8)
public_suffix (>= 2.0.2, < 8.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.4.0)
aws-partitions (1.1187.0)
aws-sdk-core (3.239.1)
aws-partitions (1.1200.0)
aws-sdk-core (3.240.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
Expand All @@ -28,7 +28,7 @@ GEM
aws-sdk-kms (1.118.0)
aws-sdk-core (~> 3, >= 3.239.1)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.205.0)
aws-sdk-s3 (1.209.0)
aws-sdk-core (~> 3, >= 3.234.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
Expand All @@ -37,7 +37,7 @@ GEM
babosa (1.0.4)
base64 (0.3.0)
benchmark (0.4.1)
bigdecimal (3.3.1)
bigdecimal (4.0.1)
claide (1.1.0)
cocoapods (1.16.2)
addressable (~> 2.8)
Expand Down Expand Up @@ -114,7 +114,7 @@ GEM
faraday-em_synchrony (1.0.1)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.1.1)
faraday-multipart (1.2.0)
multipart-post (~> 2.0)
faraday-net_http (1.0.2)
faraday-net_http_persistent (1.2.0)
Expand Down Expand Up @@ -221,15 +221,15 @@ GEM
i18n (1.14.7)
concurrent-ruby (~> 1.0)
jmespath (1.6.2)
json (2.16.0)
json (2.18.0)
jwt (2.10.2)
base64
logger (1.7.0)
mini_magick (4.13.2)
mini_mime (1.1.5)
minitest (5.25.5)
molinillo (0.8.0)
multi_json (1.17.0)
multi_json (1.19.1)
multipart-post (2.4.1)
mutex_m (0.3.0)
nanaimo (0.4.0)
Expand All @@ -239,7 +239,7 @@ GEM
nkf (0.2.0)
og-corefoundation (0.2.3)
ffi
optparse (0.8.0)
optparse (0.8.1)
os (1.1.4)
ostruct (0.6.1)
plist (3.7.2)
Expand Down
Loading