Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read flavor icons files #69

Merged
merged 7 commits into from
Feb 16, 2019
Merged

Conversation

sestegra
Copy link
Contributor

@sestegra sestegra commented Dec 22, 2018

Expected files are following:

  • flutter_launcher_icons.yaml or pubspec.yaml from default icons
  • flutter_launcher_icons-<flavor>.yaml for flavor icons

TODO

@sestegra sestegra changed the title WIP - Read flavor icons (Android support) WIP - Read flavor icons Dec 22, 2018
@sestegra sestegra changed the title WIP - Read flavor icons WIP - Read flavor icons files Dec 22, 2018
@sestegra
Copy link
Contributor Author

sestegra commented Dec 22, 2018

XCode project should contains configuration that need to be suffixed by -<flavor>. (e.g. Release-prod)

@sestegra sestegra changed the title WIP - Read flavor icons files Read flavor icons files Dec 22, 2018
@MarkOSullivan94
Copy link
Collaborator

Hey @sestegra thank you for this PR!

Apologies for the delayed response, took time off over the holiday season. Wanted to reply to this PR and acknowledge your great efforts with this, I know it had been requested in the past.

I'll need to test this before merging it in. Schedule is a bit busy atm so can't give you an estimation on when I'll get it done.

I know two users posted about the flavours idea so going to ping them in case they're interested in testing it out to help speed up the process @rockneverdies55 @GregorySech

@GregorySech
Copy link

Yeah, I'll be checking it out this week (probably in the weekend)

@MarkOSullivan94 MarkOSullivan94 self-assigned this Jan 16, 2019
@MarkOSullivan94
Copy link
Collaborator

Hi @sestegra finally getting round to testing this out, however to speed up the process, I would need a couple of things:

  1. I recommend adding the necessary configuration within the example directory so anyone can quickly test out flavor support (also really useful for me to test it)

  2. It would be great to add documentation for this new feature so everyone can figure out how to make use of it (suggest adding it to the README.md)

  3. (optional) add unit tests to ensure it wont be broken in the future - not necessary but since Continuous Integration is setup any failing unit tests will be flagged and I'll get an email so I can fix any issues before any future updates are released

@sestegra
Copy link
Contributor Author

sestegra commented Jan 18, 2019

I pushed updates for points 1 & 2.
For unit tests, only the existence of flavor file(s) could be tested, but I'm busy on the next couple weeks.

@MarkOSullivan94
Copy link
Collaborator

Hi @sestegra! Appreciate you pushing your updates.

I tried testing out your changes but I was receiving the below error message when I changed my Android run configurations to run the x build flavor.

The Gradle project does not define a task suitable for the requested build.
The android/app/build.gradle file does not define any custom product flavors.
You cannot use the --flavor option.
Finished with error: Gradle build aborted.

Curious if this PR will only work on a project which currently has flavors working for both the iOS and Android Flutter app?

If so, it would be best updating the example project so it can be run with the different flavours.

@sestegra
Copy link
Contributor Author

sestegra commented Jan 26, 2019

In fact, I have only tested the icons building, not the app itself.

See a full project example here
I'm using a script to create flavors.

@MarkOSullivan94
Copy link
Collaborator

Okay so I've tested it out in your example project and it seems to be working fine there. However I do think an example within Flutter Launcher Icons would be good.

I believe the example directory should be updated to contain two example apps:

  1. Default
  2. Flavors

Mainly because flavors seems to be pretty unique compared to the other features and I don't want people getting confused thinking they need all the different configuration files to quickly change the default Flutter app icons.

For now I'm happy to merge flavors into it's own branch until I get the example directory updated and then merge in the flavor support along with the example app showing how it works.

@sestegra
Copy link
Contributor Author

In fact, as you suggest, it's better to avoid confusion

  • to keep default icon generation as the main solution
  • to keep flavoring as an advanced and optional feature: for instance, create a seperated README

@MarkOSullivan94 MarkOSullivan94 changed the base branch from master to flavors February 16, 2019 14:51
@MarkOSullivan94 MarkOSullivan94 merged commit 6a1e009 into fluttercommunity:flavors Feb 16, 2019
@Muldec
Copy link

Muldec commented Jul 1, 2019

Any chance to see this PR merged into master any time ?

braxtont pushed a commit to braxtont/flutter_launcher_icons that referenced this pull request Aug 29, 2019
…y#69)

* Read flavor icons (Android support)

* iOS siupport

* Fix iOS support

* Fix icons sets

* Fix new icons size

* Add examples for flavors

* Update README for flavor support
@PandaGeek1024
Copy link

any updates on this?

MarkOSullivan94 added a commit that referenced this pull request Sep 12, 2020
* Supporting flavors for projects with flavors enabled (#69)

* Read flavor icons (Android support)

* iOS siupport

* Fix iOS support

* Fix icons sets

* Fix new icons size

* Add examples for flavors

* Update README for flavor support

* Supporting flavors for projects with flavors enabled (#69)

* Read flavor icons (Android support)

* iOS siupport

* Fix iOS support

* Fix icons sets

* Fix new icons size

* Add examples for flavors

* Update README for flavor support

* Apply suggestions from code review

Co-Authored-By: Mark O'Sullivan <mos182@hotmail.co.uk>

* Added a sample app that supports flavors

* Moved sample projects to example/default and example/flavors

* converting double quote to single quote

* saving changes

* improved terminal output (#193)

Co-authored-by: Mark O'Sullivan <mark@argent.im>

* fixed broken default app

Co-authored-by: Stéphane Este-Gracias <sestegra@gmail.com>
Co-authored-by: braxtont <51523001+braxtont@users.noreply.github.com>
Co-authored-by: Jorge Coca <jorge.coca.github@gmail.com>
Co-authored-by: Mark O'Sullivan <mark@argent.im>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants