From e701ce564a0cff167683d1cf5fd871ca894c7fa1 Mon Sep 17 00:00:00 2001 From: Federico Correa Date: Thu, 31 Aug 2023 15:29:34 -0300 Subject: [PATCH] feat: add flavorizr config file --- .fvm/fvm_config.json | 2 +- flavorizr.yaml | 40 +++++++++++ ios/Runner.xcodeproj/project.pbxproj | 18 ++--- ios/Runner/Info.plist | 100 +++++++++++++-------------- pubspec.lock | 38 ++++++---- pubspec.yaml | 46 +----------- 6 files changed, 125 insertions(+), 119 deletions(-) create mode 100644 flavorizr.yaml diff --git a/.fvm/fvm_config.json b/.fvm/fvm_config.json index 0e8090af..e341c5be 100644 --- a/.fvm/fvm_config.json +++ b/.fvm/fvm_config.json @@ -1,4 +1,4 @@ { - "flutterSdkVersion": "3.10.2", + "flutterSdkVersion": "3.13.2", "flavors": {} } \ No newline at end of file diff --git a/flavorizr.yaml b/flavorizr.yaml new file mode 100644 index 00000000..30b41bea --- /dev/null +++ b/flavorizr.yaml @@ -0,0 +1,40 @@ +flavors: + dev: + app: + name: 'Template Dev' + android: + applicationId: 'com.xmartlabs.template.dev' + ios: + bundleId: 'com.xmartlabs.template.dev' + variables: + FLUTTER_TARGET: + value: 'lib/main.dart' + prod: + app: + name: 'Template' + android: + applicationId: 'com.xmartlabs.template' + ios: + bundleId: 'com.xmartlabs.template' + variables: + FLUTTER_TARGET: + value: 'lib/main.dart' + staging: + app: + name: 'Template Sta' + android: + applicationId: 'com.xmartlabs.template.sta' + ios: + bundleId: 'com.xmartlabs.template.sta' + variables: + FLUTTER_TARGET: + value: 'lib/main.dart' +instructions: + - assets:download + - assets:extract + - android:buildGradle + - ios:xcconfig + - ios:buildTargets + - ios:schema + - ios:plist + - assets:clean diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 718511a0..398431c0 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -366,7 +366,7 @@ baseConfigurationReference = 6C37016DF19997B0AAD05FAF /* prodProfile.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_APPICON_NAME = "$(ASSET_PREFIX)AppIcon"; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -506,7 +506,7 @@ baseConfigurationReference = 51B5A3EF356677109FE751EB /* prodRelease.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_APPICON_NAME = "$(ASSET_PREFIX)AppIcon"; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -577,7 +577,7 @@ baseConfigurationReference = 5626E2C804EE32F56C2D8F06 /* prodDebug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_APPICON_NAME = "$(ASSET_PREFIX)AppIcon"; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -801,7 +801,7 @@ baseConfigurationReference = 78DFC5A53E53B9D74505FF20 /* devDebug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_APPICON_NAME = "$(ASSET_PREFIX)AppIcon"; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -896,7 +896,7 @@ baseConfigurationReference = 113F326E4F1DD43142CE6D30 /* stagingDebug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_APPICON_NAME = "$(ASSET_PREFIX)AppIcon"; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -991,7 +991,7 @@ baseConfigurationReference = ED9BFBD52F04E77F2174E192 /* devRelease.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_APPICON_NAME = "$(ASSET_PREFIX)AppIcon"; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -1082,7 +1082,7 @@ baseConfigurationReference = D7BA5182467EB92CA3E895F1 /* stagingRelease.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_APPICON_NAME = "$(ASSET_PREFIX)AppIcon"; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -1173,7 +1173,7 @@ baseConfigurationReference = BF41E84758AF984855B34375 /* devProfile.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_APPICON_NAME = "$(ASSET_PREFIX)AppIcon"; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -1262,7 +1262,7 @@ baseConfigurationReference = FA08A5EF6F6A019FEADEFC1B /* stagingProfile.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_APPICON_NAME = "$(ASSET_PREFIX)AppIcon"; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 402fe821..e4ed3e6b 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -1,53 +1,53 @@ - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(BUNDLE_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - CFBundleDisplayName - $(BUNDLE_DISPLAY_NAME) - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - CADisableMinimumFrameDurationOnPhone - - UIStatusBarHidden - - UIApplicationSupportsIndirectInputEvents - - - + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(BUNDLE_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + CFBundleDisplayName + $(BUNDLE_DISPLAY_NAME) + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + CADisableMinimumFrameDurationOnPhone + + UIStatusBarHidden + + UIApplicationSupportsIndirectInputEvents + + + \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index 2d7cbb59..794a41b6 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -205,10 +205,10 @@ packages: dependency: transitive description: name: collection - sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 url: "https://pub.dev" source: hosted - version: "1.17.1" + version: "1.17.2" color: dependency: transitive description: @@ -378,10 +378,10 @@ packages: dependency: "direct dev" description: name: flutter_flavorizr - sha256: ea4e1c91c6c587bc8277d274cbd4a223d4fe58e7e884d1568d3ec80746f347d1 + sha256: "54c799a467d2d5102d3e2ec9c999377ca11e30590b8d0ddd929ee9e69e26c0a0" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.2.1" flutter_gen_core: dependency: transitive description: @@ -601,10 +601,10 @@ packages: dependency: "direct main" description: name: intl - sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6 + sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" url: "https://pub.dev" source: hosted - version: "0.18.0" + version: "0.18.1" io: dependency: transitive description: @@ -673,10 +673,10 @@ packages: dependency: transitive description: name: matcher - sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" url: "https://pub.dev" source: hosted - version: "0.12.15" + version: "0.12.16" material_color_generator: dependency: "direct main" description: @@ -689,10 +689,10 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.5.0" meta: dependency: transitive description: @@ -974,10 +974,10 @@ packages: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" sprintf: dependency: transitive description: @@ -1094,10 +1094,10 @@ packages: dependency: transitive description: name: test_api - sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb + sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "0.6.0" time: dependency: transitive description: @@ -1162,6 +1162,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.2" + web: + dependency: transitive + description: + name: web + sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + url: "https://pub.dev" + source: hosted + version: "0.1.4-beta" web_socket_channel: dependency: transitive description: @@ -1203,5 +1211,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.0.0 <4.0.0" + dart: ">=3.1.0-185.0.dev <4.0.0" flutter: ">=3.10.2" diff --git a/pubspec.yaml b/pubspec.yaml index 20193a04..04a5af02 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -36,7 +36,7 @@ dependencies: freezed_annotation: 2.2.0 get_it: 7.6.0 google_fonts: 5.0.0 - intl: 0.18.0 + intl: 0.18.1 json_annotation: 4.8.1 logger: 1.3.0 material_color_generator: 1.1.0 @@ -58,7 +58,7 @@ dev_dependencies: build_runner: 2.4.4 dart_code_metrics: 5.7.4 floor_generator: 1.4.2 - flutter_flavorizr: 2.2.0 + flutter_flavorizr: 2.2.1 flutter_gen_runner: 5.3.1 flutter_launcher_icons: 0.13.1 flutter_lints: 2.0.1 @@ -79,48 +79,6 @@ flutter_gen: - environments/* - assets/README.md -flavorizr: - flavors: - dev: - app: - name: 'Template Dev' - android: - applicationId: 'com.xmartlabs.template.dev' - ios: - bundleId: 'com.xmartlabs.template.dev' - variables: - FLUTTER_TARGET: - value: 'lib/main.dart' - prod: - app: - name: 'Template' - android: - applicationId: 'com.xmartlabs.template' - ios: - bundleId: 'com.xmartlabs.template' - variables: - FLUTTER_TARGET: - value: 'lib/main.dart' - staging: - app: - name: 'Template Sta' - android: - applicationId: 'com.xmartlabs.template.sta' - ios: - bundleId: 'com.xmartlabs.template.sta' - variables: - FLUTTER_TARGET: - value: 'lib/main.dart' - instructions: - - assets:download - - assets:extract - - android:buildGradle - - ios:xcconfig - - ios:buildTargets - - ios:schema - - ios:plist - - assets:clean - # Run command: flutter pub run flutter_launcher_icons:main flutter_launcher_icons: android: true