ApplETS / Notre-Dame

The 4th generation of ÉTSMobile, the main gateway between the École de technologie supérieure and its students on mobile devices
Apache License 2.0
36 stars 12 forks source link

Adding flavors #271

Open apomalyn opened 2 years ago

apomalyn commented 2 years ago

Is your feature request related to a problem? Please describe. As a developer/maintainer, I would like to be able to have a DEV build of the application along with a PRODUCTION build. This will also set the starting block for the beta environment.

Describe the solution you'd like Each flavour would have a specific app icon (we could change the background colour of the app icon like Chrome canary is yellow or add a dev/debug banner) and a different package id (for dev/debug: normal package id with .dev OR .debug at the end).

I think this medium article describes the complete process.

Acceptation criteria

MysticFragilist commented 2 years ago

Did some tests on that what about inverting App|ETS and ÉTS colors? so the purple become primary and the red become where there was purple before:

What do you think @apomalyn? The tutorials you shared is really helpful! I did every part of the issue for Android. I still have to do the iOS part before making a PR :smile:

MysticFragilist commented 2 years ago

Do I make 3 build flavors? One Prod, one Beta and one dev?

apomalyn commented 2 years ago

@MysticFragilist I will say only change the icon of the application (purple background for dev, red background with beta written under the ÉTS logo for example). Because if we switch colours inside the application we will not 'see' what the student really see. For example, let's say we add something on the AppBar that may look really good on the dev application (purple primary) but is strange on the beta/prod application (red primary) 😄

MysticFragilist commented 2 years ago

Yeaa right make sense, I'll change it! I'm currently at the club, I'm doing the iOS part 😄 should be good to go soon ^^

MysticFragilist commented 2 years ago

Here is the two app icon on iOS! I think I finished the flavor for the iOS development. I'll just need to change the icon for android as well and it will be good.

A nice thing to have would be to design an AppIcon specifically for beta maybe a small tag "beta" on the icon below the name could be good?

apomalyn commented 2 years ago

What do you think about these? (the second one is for android because of the adaptative background)

MysticFragilist commented 2 years ago

Reallyyy goood! I like them 😄

MysticFragilist commented 2 years ago

Hmmm just one thing, I suppose it's the font, but the A seems a bit offset from the other letter. It's an idea but would you be able to add some spacing between the B and E and the E and T ? Maybe it would render better?

apomalyn commented 2 years ago

@MysticFragilist is this better? 😄

MysticFragilist commented 2 years ago

Ahhh yess really good 💯 I like it, great job!

MysticFragilist commented 2 years ago

Couple information for me :smile: :

For Beta open test in each store: https://developer.apple.com/testflight/ https://play.google.com/console/about/opentesting/ https://docs.fastlane.tools/getting-started/android/beta-deployment/ https://docs.fastlane.tools/getting-started/ios/beta-deployment/

# Production build
$ flutter build -v ${{ matrix.build_target }} ${{ matrix.build_args }} --build-number=$(date '+%s') --release --dart-define=GH_API_TOKEN=${{ secrets.GH_API_TOKEN }} --flavor=prod

# Beta  build
$ flutter build -v ${{ matrix.build_target }} ${{ matrix.build_args }} --build-number=$(date '+%s') --release --dart-define=GH_API_TOKEN=${{ secrets.GH_API_TOKEN }} --flavor=beta

# Development run
$ flutter run -t lib/main_dev.dart  --debug --flavor=dev
MysticFragilist commented 2 years ago

Also @apomalyn, what is the expected workflow of the beta deployment? Do we deploy everytime there is a new release as draft?

apomalyn commented 2 years ago

Also @apomalyn, what is the expected workflow of the beta deployment? Do we deploy everytime there is a new release as draft?

I would say each time there is a pre-release available, what do you think about that? :smile:

MysticFragilist commented 2 years ago

yes that would be perfect!

MysticFragilist commented 1 year ago

J'ai trouvé une meilleur façon de les implémenter avec un outils qui les créé automatiquement: https://pub.dev/packages/flutter_flavorizr ça sera nettement plus simple de les définir comme ça