Skip to content

Main -> Dev sync #53

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

Merged
merged 13 commits into from
Mar 6, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,10 @@ dependencies:
flutter_localizations:
sdk: flutter

cupertino_icons: ^1.0.5
{{#theme_generate}}theme_tailor_annotation: ^2.0.0{{/theme_generate}}

dev_dependencies:
flutter_test:
sdk: flutter

flutter_lints: ^2.0.1
{{#theme_generate}}theme_tailor: ^2.0.0
test: ^1.3.3{{/theme_generate}}

flutter:
uses-material-design: true
{{#handLocalization}}generate: true{{/handLocalization}}
Expand Down Expand Up @@ -81,7 +74,7 @@ flavorizr:
{{/flavorizr}}

{{^flavorizr}}
flutter_icons:
flutter_launcher_icons:
image_path: "assets/launcher_icons/ic_launcher.png"
android: true
ios: true
Expand Down
28 changes: 25 additions & 3 deletions bricks/flutter_clean_base/hooks/post_gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ void run(HookContext context) async {

Future<void> getDependencies(HookContext context) async {
List<String> dependencies = [
'cupertino_icons',
'dio',
'pretty_dio_logger',
'dio_cache_interceptor',
Expand All @@ -168,7 +169,6 @@ Future<void> getDependencies(HookContext context) async {
'path_provider',
'logger',
'fluttertoast',
'flutter_native_splash',
'collection',
'flutter_dotenv',
'flutter_jailbreak_detection',
Expand All @@ -183,14 +183,21 @@ Future<void> getDependencies(HookContext context) async {
}

List<String> devDependencies = [
'flutter_lints',
'build_runner',
'freezed',
'json_serializable',
'import_sorter',
'mockito',
'bloc_test',
'test',
];

if (context.vars['theme_generate']) {
dependencies.add('theme_tailor_annotation:2.1.0');
devDependencies.add('theme_tailor:2.1.0');
}

switch (context.vars['navigation']) {
case 'goRouter':
dependencies.add('go_router');
Expand Down Expand Up @@ -239,7 +246,7 @@ Future<void> getDependencies(HookContext context) async {
'Dependencies installed successfully'.log();
} else {
'Failed to install dependencies... Exit code: $exitCode'.error();
exitBrick();
//exitBrick();
}

'Getting dev dependencies...'.log();
Expand All @@ -256,7 +263,22 @@ Future<void> getDependencies(HookContext context) async {
'Dev dependencies installed successfully'.log();
} else {
'Failed to install dev dependencies... Exit code: $exitCode'.error();
exitBrick();
//exitBrick();
}

var nativeSplashDepProc = await Process.start(
'flutter', ['pub', 'add', 'flutter_native_splash'],
workingDirectory: name);

nativeSplashDepProc.log();

exitCode = await nativeSplashDepProc.exitCode;

if (exitCode == 0) {
'flutter_native_splash installed successfully'.log();
} else {
'Failed to install flutter_native_splash... Exit code: $exitCode'.error();
//exitBrick();
}
}

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Onix Flutter Clean Architecture

publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 1.0.22+22
version: 1.0.23+23

environment:
sdk: '>=3.2.0 <4.0.0'
Expand Down