Skip to content

Commit

Permalink
Merge pull request #107 from fluttercommunity/dev
Browse files Browse the repository at this point in the history
replacing dart_config dependency with yaml dependency & refactoring
  • Loading branch information
Mark O'Sullivan authored May 23, 2019
2 parents 3c465be + bb5dad6 commit 7aed812
Show file tree
Hide file tree
Showing 13 changed files with 601 additions and 429 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 0.7.1 (24th May 2019)

- Fixed issue with image dependency not working on latest version of Flutter (thanks to @sboutet06)
- Fixed iOS icon sizes which were incorrect (thanks to @sestegra)
- Removed dart_config git dependency and replaced with yaml dependency
- Refactoring of code

## 0.7.0 (22nd November 2018)

- Now ensuring that the Android file name is valid - An error will be thrown if it doesn't meet the criteria
Expand Down
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<img src="https://img.shields.io/badge/Flutter%20Community-flutter__launcher__icons-blue.svg?style=for-the-badge&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAA5CAYAAABwDahPAAAAB3RJTUUH4gYTFygnu4qzzAAAAAlwSFlzAAAewgAAHsIBbtB1PgAAAARnQU1BAACxjwv8YQUAAAjVSURBVHjazZp5UJTnHcddWO5rd9ndd99llUMUUVhOYTnEaNAFYbk0cXJZlTRNWyqHlRtzNE0yJURFzkUSBUSjMZkYoqTT6B/SeDSYtBoOj1i1TpNpZ/yjje2MwK/P8+zhArv7vu++u05/M88Ms7M87+f7u57j3QULXGTuAUulAYuL82QJZT1KTcM4ndL4L88FP4eC/uvw7B8e4PFgy7npH7iNqR9KRwG0XV/+wiXQ3opVsaKoZ6vlieWn6NTau8q0ph9D0nfPKDVNEEiXQ/aeL2HLyLRhnMNjitPYdhFg40d3PpIma72cBu3mG+YXGLlpO5VcNRKS/gqoMl+HkIxXAf+N4IFObYQgVQWCPw9bz4MRnhv4I/jbJ5wGLvBUCEVRz5XRmvo7j6B3zxom+HX7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t+obnZrEQIhBJ3lE6fMkYCi1hSCfHNl1HBXoUg9JkceZRAYzA74PNFtBsEWBNBBNTdC4zctJF1PZDCjil9S8XwQw/cnei4GqDWNCOQPiM4M7TNSKTNjgR2IkrrM6gjcf/BBzb/sPwNtKb+nr1o4MUuJLUBaO0eA4gDAixFKC1edIujt9Q/omEoYlvm7r8kQKp+WU8iYatLYc+h4qa1e3mLoPNRGiZXnfWSaaIcArZl3sonEuSJOz7GQqz++Mksgl8k8DoRnPOO697weNOr41B9tKDCuokjQjqWZa1gEevfRSIOsi7k+SL60bZjzymBX6iby4S4eS/08lVlr5Es37obReYLxcrqMWVa430UiSmTCIejYNx2YBFuklg/l4mwNIEn7e67cH2yJKa0BnWOIUVC+RV5TssYWokn5Lp2h4aipPfHwPSdL5qe8T+XgeDXeA98zQAAAABJRU5ErkJggg==" width="600">

[![Build Status](https://travis-ci.org/MarkOSullivan94/flutter_launcher_icons.svg?branch=master)](https://travis-ci.org/MarkOSullivan94/flutter_launcher_icons) [![pub package](https://img.shields.io/pub/v/flutter_launcher_icons.svg)](https://pub.dartlang.org/packages/flutter_launcher_icons)
[![Build Status](https://travis-ci.org/fluttercommunity/flutter_launcher_icons.svg?branch=master)](https://travis-ci.org/MarkOSullivan94/flutter_launcher_icons) [![pub package](https://img.shields.io/pub/v/flutter_launcher_icons.svg)](https://pub.dartlang.org/packages/flutter_launcher_icons)

# Flutter Launcher Icons

Expand All @@ -9,6 +9,11 @@ A command-line tool which simplifies the task of updating your Flutter app's lau

## :sparkles: What's New

#### Version 0.7.1 (24th May 2019)
* Fixed issue with image dependency not working on latest version of Flutter (thanks to @sboutet06)
* Fixed iOS icon sizes which were incorrect (thanks to @sestegra)
* Removed dart_config git dependency and replaced with yaml dependency

#### Version 0.7.0 (22nd November 2018)
* Added check to ensure the Android file name is valid
* Fixed issue where there was a git diff when there was no change
Expand All @@ -34,7 +39,7 @@ Add your Flutter Launcher Icons configuration to your `pubspec.yaml` or create a
An example is shown below. A more complex example [can be found in the example project](https://github.com/fluttercommunity/flutter_launcher_icons/blob/master/example/pubspec.yaml).
```yaml
dev_dependencies:
flutter_launcher_icons: "^0.7.0"
flutter_launcher_icons: "^0.7.1"

flutter_icons:
android: "launcher_icon"
Expand All @@ -45,8 +50,8 @@ If you name your configuration file something other than `flutter_launcher_icons
the name of the file when running the package.

```
flutter packages get
flutter packages pub run flutter_launcher_icons:main -f <your config file name here>
flutter pub get
flutter pub run flutter_launcher_icons:main -f <your config file name here>
```
Note: If you are not using the existing `pubspec.yaml` ensure that your config file is located in the same directory as it.
Expand All @@ -56,8 +61,8 @@ Note: If you are not using the existing `pubspec.yaml` ensure that your config f
After setting up the configuration, all that is left to do is run the package.
```
flutter packages get
flutter packages pub run flutter_launcher_icons:main
flutter pub get
flutter pub pub run flutter_launcher_icons:main
```
If you encounter any issues [please report them here](https://github.com/fluttercommunity/flutter_launcher_icons/issues).
Expand Down
180 changes: 169 additions & 11 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,180 @@
# Last updated: 18th January 2018
# Following guideline set here: https://pub.dartlang.org/help#health
# Specify analysis options.
#
# Until there are meta linter rules, each desired lint must be explicitly enabled.
# See: https://github.com/dart-lang/linter/issues/288
#
# For a list of lints, see: http://dart-lang.github.io/linter/lints/
# See the configuration guide for more
# https://github.com/dart-lang/sdk/tree/master/pkg/analyzer#configuring-the-analyzer
#
# There are other similar analysis options files in the flutter repos,
# which should be kept in sync with this file:
#
# - analysis_options.yaml (this file)
# - packages/flutter/lib/analysis_options_user.yaml
# - https://github.com/flutter/plugins/blob/master/analysis_options.yaml
# - https://github.com/flutter/engine/blob/master/analysis_options.yaml
#
# This file contains the analysis options used by Flutter tools, such as IntelliJ,
# Android Studio, and the `flutter analyze` command.

analyzer:
# exclude:
# - path/to/excluded/files/**
strong-mode:
implicit-dynamic: false
errors:
# treat missing required parameters as a warning (not a hint)
missing_required_param: warning
# treat missing returns as a warning (not a hint)
missing_return: warning
# allow having TODOs in the code
todo: ignore
# Ignore analyzer hints for updating pubspecs when using Future or
# Stream and not importing dart:async
# Please see https://github.com/flutter/flutter/pull/24528 for details.
sdk_version_async_exported_from_core: ignore
exclude:
- 'bin/cache/**'
# the following two are relative to the stocks example and the flutter package respectively
# see https://github.com/dart-lang/sdk/issues/28463
- 'lib/i18n/stock_messages_*.dart'
- 'lib/src/http/**'

# Lint rules and documentation, see http://dart-lang.github.io/linter/lints
linter:
rules:
# these rules are documented on and in the same order as
# the Dart Lint rules page to make maintenance easier
# https://github.com/dart-lang/linter/blob/master/example/all.yaml
- always_declare_return_types
- always_put_control_body_on_new_line
# - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219
- always_require_non_null_named_parameters
- always_specify_types
- annotate_overrides
# - avoid_annotating_with_dynamic # conflicts with always_specify_types
- avoid_as
# - avoid_bool_literals_in_conditional_expressions # not yet tested
# - avoid_catches_without_on_clauses # we do this commonly
# - avoid_catching_errors # we do this commonly
- avoid_classes_with_only_static_members
# - avoid_double_and_int_checks # only useful when targeting JS runtime
- avoid_empty_else
- avoid_field_initializers_in_const_classes
- avoid_function_literals_in_foreach_calls
# - avoid_implementing_value_types # not yet tested
- avoid_init_to_null
# - avoid_js_rounded_ints # only useful when targeting JS runtime
- avoid_null_checks_in_equality_operators
# - avoid_positional_boolean_parameters # not yet tested
# - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356)
- avoid_relative_lib_imports
- avoid_renaming_method_parameters
- avoid_return_types_on_setters
# - avoid_returning_null # there are plenty of valid reasons to return null
# - avoid_returning_null_for_future # not yet tested
- avoid_returning_null_for_void
# - avoid_returning_this # there are plenty of valid reasons to return this
# - avoid_setters_without_getters # not yet tested
# - avoid_shadowing_type_parameters # not yet tested
# - avoid_single_cascade_in_expression_statements # not yet tested
- avoid_slow_async_io
- avoid_types_as_parameter_names
# - avoid_types_on_closure_parameters # conflicts with always_specify_types
- avoid_unused_constructor_parameters
- avoid_void_async
- await_only_futures
- camel_case_types
- non_constant_identifier_names
- cancel_subscriptions
# - cascade_invocations # not yet tested
# - close_sinks # not reliable enough
# - comment_references # blocked on https://github.com/flutter/flutter/issues/20765
# - constant_identifier_names # needs an opt-out https://github.com/dart-lang/linter/issues/204
- control_flow_in_finally
# - curly_braces_in_flow_control_structures # not yet tested
- directives_ordering
- empty_catches
- empty_constructor_bodies
- empty_statements
# - file_names # not yet tested
- flutter_style_todos
- hash_and_equals
- implementation_imports
# - invariant_booleans # too many false positives: https://github.com/dart-lang/linter/issues/811
- iterable_contains_unrelated_type
# - join_return_with_assignment # not yet tested
- library_names
- library_prefixes
# - lines_longer_than_80_chars # not yet tested
- list_remove_unrelated_type
- unrelated_type_equality_checks
- valid_regexps
- cancel_subscriptions
# - literal_only_boolean_expressions # too many false positives: https://github.com/dart-lang/sdk/issues/34181
- no_adjacent_strings_in_list
- no_duplicate_case_values
- non_constant_identifier_names
# - null_closures # not yet tested
# - omit_local_variable_types # opposite of always_specify_types
# - one_member_abstracts # too many false positives
# - only_throw_errors # https://github.com/flutter/flutter/issues/5792
- overridden_fields
- package_api_docs
- package_names
- package_prefixed_library_names
# - parameter_assignments # we do this commonly
- prefer_adjacent_string_concatenation
- prefer_asserts_in_initializer_lists
- prefer_collection_literals
- prefer_conditional_assignment
- prefer_const_constructors
- prefer_const_constructors_in_immutables
- prefer_const_declarations
- prefer_const_literals_to_create_immutables
# - prefer_constructors_over_static_methods # not yet tested
- prefer_contains
- prefer_equal_for_default_values
# - prefer_expression_function_bodies # conflicts with https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#consider-using--for-short-functions-and-methods
- prefer_final_fields
- prefer_final_locals
- prefer_foreach
# - prefer_function_declarations_over_variables # not yet tested
- prefer_generic_function_type_aliases
- prefer_initializing_formals
# - prefer_int_literals # not yet tested
# - prefer_interpolation_to_compose_strings # not yet tested
- prefer_is_empty
- prefer_is_not_empty
- prefer_iterable_whereType
# - prefer_mixin # https://github.com/dart-lang/language/issues/32
# - prefer_null_aware_operators # disable until NNBD, see https://github.com/flutter/flutter/pull/32711#issuecomment-492930932
- prefer_single_quotes
- prefer_typing_uninitialized_variables
- prefer_void_to_null
# - public_member_api_docs # enabled on a case-by-case basis; see e.g. packages/analysis_options.yaml
- recursive_getters
- slash_for_doc_comments
- sort_constructors_first
- sort_pub_dependencies
- sort_unnamed_constructors_first
# - super_goes_last # no longer needed w/ Dart 2
- test_types_in_equals
- constant_identifier_names
- throw_in_finally
# - type_annotate_public_apis # subset of always_specify_types
- type_init_formals
# - unawaited_futures # too many false positives
# - unnecessary_await_in_return # not yet tested
- unnecessary_brace_in_string_interps
- unnecessary_const
- unnecessary_getters_setters
# - unnecessary_lambdas # has false positives: https://github.com/dart-lang/linter/issues/498
- unnecessary_new
- unnecessary_lambdas
- unnecessary_null_aware_assignments
- unnecessary_null_in_if_null_operators
- unnecessary_overrides
- unnecessary_parenthesis
- unnecessary_statements
- unnecessary_this
- unrelated_type_equality_checks
# - use_function_type_syntax_for_parameters # not yet tested
- use_rethrow_when_possible
# - use_setters_to_change_properties # not yet tested
# - use_string_buffers # has false positives: https://github.com/dart-lang/sdk/issues/34182
# - use_to_and_as_if_applicable # has false positives, so we prefer to catch this by code-review
- valid_regexps
# - void_checks # not yet tested
6 changes: 3 additions & 3 deletions bin/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter_launcher_icons/main.dart' as FlutterLauncherIcons;
import 'package:flutter_launcher_icons/main.dart' as flutter_launcher_icons;

main(List<String> arguments) {
FlutterLauncherIcons.createIconsFromArguments(arguments);
void main(List<String> arguments) {
flutter_launcher_icons.createIconsFromArguments(arguments);
}
Loading

0 comments on commit 7aed812

Please sign in to comment.