From b5c12f351bf8ca8d3d594d86042a0ae486b66dfc Mon Sep 17 00:00:00 2001 From: Tran Manh Date: Thu, 31 Mar 2022 14:17:36 +0700 Subject: [PATCH 1/8] Bump version v0.6.0 (7) for develop --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index bfb93387..9cbdf5df 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 0.5.0+6 +version: 0.6.0+7 environment: sdk: ">=2.16.1 <3.0.0" From 4fbf09bcc7e73b93b779e20a9fd58eedf3bca3aa Mon Sep 17 00:00:00 2001 From: "doan@nimblehq.co" Date: Wed, 13 Apr 2022 00:40:58 +0700 Subject: [PATCH 2/8] [#37] Update min Android SDK 23 and iOS 10 --- android/app/build.gradle | 2 +- ios/Runner.xcodeproj/project.pbxproj | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 68ad9824..39b79f66 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -50,7 +50,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "co.nimblehq.flutter.template" - minSdkVersion 16 + minSdkVersion 23 targetSdkVersion 31 versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index ff1c224f..206275d0 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -370,6 +370,7 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -499,6 +500,7 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -522,6 +524,7 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -599,6 +602,7 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -677,6 +681,7 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -752,6 +757,7 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -826,6 +832,7 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -898,6 +905,7 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -970,6 +978,7 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", From 8fbab24076c29289a44f221eacfde7ffb8138a2f Mon Sep 17 00:00:00 2001 From: Tran Manh Date: Wed, 6 Apr 2022 18:16:58 +0700 Subject: [PATCH 3/8] [#63] Move flutter project to .template folder --- .gitignore | 95 +---------------- .env.sample => .template/.env.sample | 0 .template/.github/CODEOWNERS | 8 ++ .../.github/ISSUE_TEMPLATE/bug_template.md | 20 ++++ .../.github/ISSUE_TEMPLATE/chore_template.md | 14 +++ .../ISSUE_TEMPLATE/feature_template.md | 14 +++ .../.github/ISSUE_TEMPLATE/story_template.md | 22 ++++ .template/.github/PULL_REQUEST_TEMPLATE.md | 16 +++ .../PULL_REQUEST_TEMPLATE/release_template.md | 15 +++ .../.github}/workflows/test.yml | 0 .template/.gitignore | 99 ++++++++++++++++++ .metadata => .template/.metadata | 0 .template/README.md | 70 +++++++++++++ .../analysis_options.yaml | 0 {android => .template/android}/.gitignore | 0 .../android}/app/build.gradle | 0 .../app/src/debug/AndroidManifest.xml | 0 .../android}/app/src/main/AndroidManifest.xml | 0 .../nimblehq/flutter/template/MainActivity.kt | 0 .../res/drawable-v21/launch_background.xml | 0 .../main/res/drawable/launch_background.xml | 0 .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin .../app/src/main/res/values-night/styles.xml | 0 .../app/src/main/res/values/strings.xml | 0 .../app/src/main/res/values/styles.xml | 0 .../app/src/profile/AndroidManifest.xml | 0 .../app/src/staging/res/values/strings.xml | 0 {android => .template/android}/build.gradle | 0 .../android}/gradle.properties | 0 .../gradle/wrapper/gradle-wrapper.properties | 0 .../android}/settings.gradle | 0 .../assets}/fonts/neuzeit.otf | Bin .../assets}/images/nimble_logo.png | Bin build.yaml => .template/build.yaml | 0 .../integration_test}/my_home_page_test.dart | 0 .../integration_test}/real_app_test.dart | 0 .../integration_test}/utils/test_util.dart | 0 {ios => .template/ios}/.gitignore | 0 .../ios}/Flutter/AppFrameworkInfo.plist | 2 +- {ios => .template/ios}/Flutter/Debug.xcconfig | 0 .../ios}/Flutter/Release.xcconfig | 0 {ios => .template/ios}/Podfile | 0 {ios => .template/ios}/Podfile.lock | 10 +- .../ios}/Runner.xcodeproj/project.pbxproj | 2 +- .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../xcshareddata/WorkspaceSettings.xcsettings | 0 .../xcschemes/production.xcscheme | 0 .../xcshareddata/xcschemes/staging.xcscheme | 0 .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../xcshareddata/WorkspaceSettings.xcsettings | 0 .../ios}/Runner/AppDelegate.swift | 0 .../AppIcon.appiconset/Contents.json | 0 .../Icon-App-1024x1024@1x.png | Bin .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin .../Icon-App-83.5x83.5@2x.png | Bin .../LaunchImage.imageset/Contents.json | 0 .../LaunchImage.imageset/LaunchImage.png | Bin .../LaunchImage.imageset/LaunchImage@2x.png | Bin .../LaunchImage.imageset/LaunchImage@3x.png | Bin .../LaunchImage.imageset/README.md | 0 .../Runner/Base.lproj/LaunchScreen.storyboard | 0 .../ios}/Runner/Base.lproj/Main.storyboard | 0 {ios => .template/ios}/Runner/Info.plist | 0 .../ios}/Runner/Runner-Bridging-Header.h | 0 l10n.yaml => .template/l10n.yaml | 0 {lib => .template/lib}/api/api_service.dart | 0 .../api/exception/network_exceptions.dart | 0 .../api/repository/credential_repository.dart | 0 .../lib}/di/interceptor/app_interceptor.dart | 0 .../lib}/di/provider/dio_provider.dart | 0 {lib => .template/lib}/env.dart | 0 {lib => .template/lib}/l10n/app_en.arb | 0 {lib => .template/lib}/l10n/app_th.arb | 0 {lib => .template/lib}/l10n/app_vi.arb | 0 {lib => .template/lib}/main.dart | 0 .../lib}/model/response/user_response.dart | 0 pubspec.lock => .template/pubspec.lock | 0 pubspec.yaml => .template/pubspec.yaml | 0 .../credential_repository_test.dart | 0 .../test}/mocks/generate_mocks.dart | 0 .../test_driver}/integration_test.dart | 0 README.md | 42 -------- 100 files changed, 289 insertions(+), 140 deletions(-) rename .env.sample => .template/.env.sample (100%) create mode 100644 .template/.github/CODEOWNERS create mode 100644 .template/.github/ISSUE_TEMPLATE/bug_template.md create mode 100644 .template/.github/ISSUE_TEMPLATE/chore_template.md create mode 100644 .template/.github/ISSUE_TEMPLATE/feature_template.md create mode 100644 .template/.github/ISSUE_TEMPLATE/story_template.md create mode 100644 .template/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 .template/.github/PULL_REQUEST_TEMPLATE/release_template.md rename {.github => .template/.github}/workflows/test.yml (100%) create mode 100644 .template/.gitignore rename .metadata => .template/.metadata (100%) create mode 100644 .template/README.md rename analysis_options.yaml => .template/analysis_options.yaml (100%) rename {android => .template/android}/.gitignore (100%) rename {android => .template/android}/app/build.gradle (100%) rename {android => .template/android}/app/src/debug/AndroidManifest.xml (100%) rename {android => .template/android}/app/src/main/AndroidManifest.xml (100%) rename {android => .template/android}/app/src/main/kotlin/co/nimblehq/flutter/template/MainActivity.kt (100%) rename {android => .template/android}/app/src/main/res/drawable-v21/launch_background.xml (100%) rename {android => .template/android}/app/src/main/res/drawable/launch_background.xml (100%) rename {android => .template/android}/app/src/main/res/mipmap-hdpi/ic_launcher.png (100%) rename {android => .template/android}/app/src/main/res/mipmap-mdpi/ic_launcher.png (100%) rename {android => .template/android}/app/src/main/res/mipmap-xhdpi/ic_launcher.png (100%) rename {android => .template/android}/app/src/main/res/mipmap-xxhdpi/ic_launcher.png (100%) rename {android => .template/android}/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png (100%) rename {android => .template/android}/app/src/main/res/values-night/styles.xml (100%) rename {android => .template/android}/app/src/main/res/values/strings.xml (100%) rename {android => .template/android}/app/src/main/res/values/styles.xml (100%) rename {android => .template/android}/app/src/profile/AndroidManifest.xml (100%) rename {android => .template/android}/app/src/staging/res/values/strings.xml (100%) rename {android => .template/android}/build.gradle (100%) rename {android => .template/android}/gradle.properties (100%) rename {android => .template/android}/gradle/wrapper/gradle-wrapper.properties (100%) rename {android => .template/android}/settings.gradle (100%) rename {assets => .template/assets}/fonts/neuzeit.otf (100%) rename {assets => .template/assets}/images/nimble_logo.png (100%) rename build.yaml => .template/build.yaml (100%) rename {integration_test => .template/integration_test}/my_home_page_test.dart (100%) rename {integration_test => .template/integration_test}/real_app_test.dart (100%) rename {integration_test => .template/integration_test}/utils/test_util.dart (100%) rename {ios => .template/ios}/.gitignore (100%) rename {ios => .template/ios}/Flutter/AppFrameworkInfo.plist (97%) rename {ios => .template/ios}/Flutter/Debug.xcconfig (100%) rename {ios => .template/ios}/Flutter/Release.xcconfig (100%) rename {ios => .template/ios}/Podfile (100%) rename {ios => .template/ios}/Podfile.lock (68%) rename {ios => .template/ios}/Runner.xcodeproj/project.pbxproj (99%) rename {ios => .template/ios}/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata (100%) rename {ios => .template/ios}/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename {ios => .template/ios}/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (100%) rename {ios => .template/ios}/Runner.xcodeproj/xcshareddata/xcschemes/production.xcscheme (100%) rename {ios => .template/ios}/Runner.xcodeproj/xcshareddata/xcschemes/staging.xcscheme (100%) rename {ios => .template/ios}/Runner.xcworkspace/contents.xcworkspacedata (100%) rename {ios => .template/ios}/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename {ios => .template/ios}/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (100%) rename {ios => .template/ios}/Runner/AppDelegate.swift (100%) rename {ios => .template/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename {ios => .template/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png (100%) rename {ios => .template/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png (100%) rename {ios => .template/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png (100%) rename {ios => .template/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png (100%) rename {ios => .template/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png (100%) rename {ios => .template/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png (100%) rename {ios => .template/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png (100%) rename {ios => .template/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png (100%) rename {ios => .template/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png (100%) rename {ios => .template/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png (100%) rename {ios => .template/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png (100%) rename {ios => .template/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png (100%) rename {ios => .template/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png (100%) rename {ios => .template/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png (100%) rename {ios => .template/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png (100%) rename {ios => .template/ios}/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json (100%) rename {ios => .template/ios}/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png (100%) rename {ios => .template/ios}/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png (100%) rename {ios => .template/ios}/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png (100%) rename {ios => .template/ios}/Runner/Assets.xcassets/LaunchImage.imageset/README.md (100%) rename {ios => .template/ios}/Runner/Base.lproj/LaunchScreen.storyboard (100%) rename {ios => .template/ios}/Runner/Base.lproj/Main.storyboard (100%) rename {ios => .template/ios}/Runner/Info.plist (100%) rename {ios => .template/ios}/Runner/Runner-Bridging-Header.h (100%) rename l10n.yaml => .template/l10n.yaml (100%) rename {lib => .template/lib}/api/api_service.dart (100%) rename {lib => .template/lib}/api/exception/network_exceptions.dart (100%) rename {lib => .template/lib}/api/repository/credential_repository.dart (100%) rename {lib => .template/lib}/di/interceptor/app_interceptor.dart (100%) rename {lib => .template/lib}/di/provider/dio_provider.dart (100%) rename {lib => .template/lib}/env.dart (100%) rename {lib => .template/lib}/l10n/app_en.arb (100%) rename {lib => .template/lib}/l10n/app_th.arb (100%) rename {lib => .template/lib}/l10n/app_vi.arb (100%) rename {lib => .template/lib}/main.dart (100%) rename {lib => .template/lib}/model/response/user_response.dart (100%) rename pubspec.lock => .template/pubspec.lock (100%) rename pubspec.yaml => .template/pubspec.yaml (100%) rename {test => .template/test}/api/repository/credential_repository_test.dart (100%) rename {test => .template/test}/mocks/generate_mocks.dart (100%) rename {test_driver => .template/test_driver}/integration_test.dart (100%) diff --git a/.gitignore b/.gitignore index ab30da8d..966f63a6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,99 +1,6 @@ -*.gem -*.rbc -/.config -/.idea -/coverage/ -/InstalledFiles -/node-modules -/pkg/ -/spec/reports/ -/spec/examples.txt -/test/tmp/ -/test/version_tmp/ -/tmp/ - -# Used by dotenv library to load environment variables. -.env -.env.staging - -## Documentation cache and generated files: -/.yardoc/ -/_yardoc/ -/doc/ -/rdoc/ - -## Environment normalization: -/.bundle/ -/vendor/bundle -/lib/bundler/man/ - -# for a library or gem, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# Gemfile.lock -# .ruby-version -# .ruby-gemset - -# unless supporting rvm < 1.11.0 or doing something fancy, ignore this: -.rvmrc - # Miscellaneous -*.class -*.log -*.pyc -*.swp .DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -.vscode/ - -# Flutter version manager related -.fvm/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -**/ios/.envfile -**/ios/Flutter/tmp.xcconfig -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Android Studio will place build artifacts here -/android/app/debug -/android/app/profile -/android/app/release # Python .venv/ - -# Flutter generated files -*.g.dart -*.gen.dart -*.config.dart -*.freezed.dart -*.mocks.dart +scripts/__pycache__/ diff --git a/.env.sample b/.template/.env.sample similarity index 100% rename from .env.sample rename to .template/.env.sample diff --git a/.template/.github/CODEOWNERS b/.template/.github/CODEOWNERS new file mode 100644 index 00000000..702a7f76 --- /dev/null +++ b/.template/.github/CODEOWNERS @@ -0,0 +1,8 @@ +# Team Lead +* @manh-t + +# Team Members +* @doannimble @luongvo @markgravity + +# Engineering Leads +CODEOWNERS @nimblehq/engineering-leads diff --git a/.template/.github/ISSUE_TEMPLATE/bug_template.md b/.template/.github/ISSUE_TEMPLATE/bug_template.md new file mode 100644 index 00000000..5eb84c37 --- /dev/null +++ b/.template/.github/ISSUE_TEMPLATE/bug_template.md @@ -0,0 +1,20 @@ +--- +name: "Bug Report" +about: "You found something that is not working. Report it so that it can be fixed. 👷‍" +title: "Fix: " +labels: "type : bug" +--- + +## Issue + +Describe the issue you are facing. Show us the implementation: screenshots, gif, etc. + +## Expected + +Describe what should be the correct behaviour. + +## Steps to reproduce + +1. +2. +3. diff --git a/.template/.github/ISSUE_TEMPLATE/chore_template.md b/.template/.github/ISSUE_TEMPLATE/chore_template.md new file mode 100644 index 00000000..bb36ec26 --- /dev/null +++ b/.template/.github/ISSUE_TEMPLATE/chore_template.md @@ -0,0 +1,14 @@ +--- +name: "Chore" +about: "Open a Chore for minor update." +title: "Update " +labels: "type : chore" +--- + +## Why + +Describe the update details and why it's needed. + +## Who Benefits? + +Describe who will be the beneficiaries e.g. everyone, specific chapters, clients... diff --git a/.template/.github/ISSUE_TEMPLATE/feature_template.md b/.template/.github/ISSUE_TEMPLATE/feature_template.md new file mode 100644 index 00000000..5a26eb96 --- /dev/null +++ b/.template/.github/ISSUE_TEMPLATE/feature_template.md @@ -0,0 +1,14 @@ +--- +name: "Feature" +about: "Open a feature issue to add new functionalities." +title: "Add " +labels: "type : feature" +--- + +## Why + +Describe the big picture of the feature and why it's needed. + +## Who Benefits? + +Describe who will be the beneficiaries e.g. everyone, specific chapters, clients... diff --git a/.template/.github/ISSUE_TEMPLATE/story_template.md b/.template/.github/ISSUE_TEMPLATE/story_template.md new file mode 100644 index 00000000..9d5c1108 --- /dev/null +++ b/.template/.github/ISSUE_TEMPLATE/story_template.md @@ -0,0 +1,22 @@ +--- +name: "Story" +about: "Open a feature story" +title: "[Type] As a user, I can " +labels: "type : feature" +--- + +## Why + +Describe the idea of the user story as in what the motive of the user story is. + +## Acceptance Criteria + +List down how the user story will be tested and what criteria are necessary for the user story to be accepted. + +## Design + +(Optional) Add design screenshots or Figma links for UI/UX-related stories. + +## Resources + +(Optional) Add useful resources such as links to documentation, implementation ideas, or best practices. diff --git a/.template/.github/PULL_REQUEST_TEMPLATE.md b/.template/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..bf553ce5 --- /dev/null +++ b/.template/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +https://github.com/nimblehq/flutter_templates/issues/?? + +## What happened 👀 + +Describe the big picture of your changes here to communicate to the team why we should accept this pull request. + +## Insight 📝 + +Describe in details how to test the changes, which solution you tried but did not go with, referenced documentation is +welcome as well. + +## Proof Of Work 📹 + +Show us the implementation: screenshots, gif, etc. + + diff --git a/.template/.github/PULL_REQUEST_TEMPLATE/release_template.md b/.template/.github/PULL_REQUEST_TEMPLATE/release_template.md new file mode 100644 index 00000000..81bfc7c9 --- /dev/null +++ b/.template/.github/PULL_REQUEST_TEMPLATE/release_template.md @@ -0,0 +1,15 @@ +Link to the milestone on Github e.g. https://github.com/nimblehq/flutter_templates/milestone/41?closed=1 +or Link to the project management tool for the release + +## Features + +Provide the ID and title of the issue in the section for each type (feature, chore and bug). The link is optional. + +- [#1] As a user, I can log in or +- [[#1](https://github.com/nimblehq/flutter_templates/issues/1)] As a user, I can log in + +## Chores +- Same structure as in ## Feature + +## Bugs +- Same structure as in ## Feature diff --git a/.github/workflows/test.yml b/.template/.github/workflows/test.yml similarity index 100% rename from .github/workflows/test.yml rename to .template/.github/workflows/test.yml diff --git a/.template/.gitignore b/.template/.gitignore new file mode 100644 index 00000000..ab30da8d --- /dev/null +++ b/.template/.gitignore @@ -0,0 +1,99 @@ +*.gem +*.rbc +/.config +/.idea +/coverage/ +/InstalledFiles +/node-modules +/pkg/ +/spec/reports/ +/spec/examples.txt +/test/tmp/ +/test/version_tmp/ +/tmp/ + +# Used by dotenv library to load environment variables. +.env +.env.staging + +## Documentation cache and generated files: +/.yardoc/ +/_yardoc/ +/doc/ +/rdoc/ + +## Environment normalization: +/.bundle/ +/vendor/bundle +/lib/bundler/man/ + +# for a library or gem, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# Gemfile.lock +# .ruby-version +# .ruby-gemset + +# unless supporting rvm < 1.11.0 or doing something fancy, ignore this: +.rvmrc + +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +.vscode/ + +# Flutter version manager related +.fvm/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +**/ios/.envfile +**/ios/Flutter/tmp.xcconfig +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Web related +lib/generated_plugin_registrant.dart + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release + +# Python +.venv/ + +# Flutter generated files +*.g.dart +*.gen.dart +*.config.dart +*.freezed.dart +*.mocks.dart diff --git a/.metadata b/.template/.metadata similarity index 100% rename from .metadata rename to .template/.metadata diff --git a/.template/README.md b/.template/README.md new file mode 100644 index 00000000..602645f7 --- /dev/null +++ b/.template/README.md @@ -0,0 +1,70 @@ +# Flutter Templates + +All the templates that can be used to kick off a new Flutter application quickly. + +## Usage + +Clone the repository + +`git clone git@github.com:nimblehq/flutter_templates.git` + +## Prerequisite + +- Flutter 2.10.3 +- Flutter version manager (recommend): [fvm](https://fvm.app/) + +## Getting Started + +### Setup + +- Create these `.env` files in the root directory according to the flavors and add the required + environment variables into them. The example environment variable is in `.env.sample`. + + - Staging: `.env.staging` + + - Production: `.env` + +- Run code generator + + - `$ fvm flutter packages pub run build_runner build --delete-conflicting-outputs` + +### Run + +- Run the app with the desire app flavor: + + - Staging: `$ fvm flutter run --flavor staging` + + - Production: `$ fvm flutter run --flavor production` + +### Test + +- Run unit testing: + + - `$ fvm flutter test .` + +- Run integration testing: + + - `$ fvm flutter drive --driver=test_driver/integration_test.dart --target=integration_test/{test_file}.dart --flavor staging` + + - For example: + + `$ fvm flutter drive --driver=test_driver/integration_test.dart --target=integration_test/my_home_page_test.dart --flavor staging` + +## License + +This project is Copyright (c) 2014 and onwards. It is free software, +and may be redistributed under the terms specified in the [LICENSE] file. + +[LICENSE]: /LICENSE + +## About + +![Nimble](https://assets.nimblehq.co/logo/dark/logo-dark-text-160.png) + +This project is maintained and funded by Nimble. + +We love open source and do our part in sharing our work with the community! +See [our other projects][community] or [hire our team][hire] to help build your product. + +[community]: https://github.com/nimblehq +[hire]: https://nimblehq.co/ diff --git a/analysis_options.yaml b/.template/analysis_options.yaml similarity index 100% rename from analysis_options.yaml rename to .template/analysis_options.yaml diff --git a/android/.gitignore b/.template/android/.gitignore similarity index 100% rename from android/.gitignore rename to .template/android/.gitignore diff --git a/android/app/build.gradle b/.template/android/app/build.gradle similarity index 100% rename from android/app/build.gradle rename to .template/android/app/build.gradle diff --git a/android/app/src/debug/AndroidManifest.xml b/.template/android/app/src/debug/AndroidManifest.xml similarity index 100% rename from android/app/src/debug/AndroidManifest.xml rename to .template/android/app/src/debug/AndroidManifest.xml diff --git a/android/app/src/main/AndroidManifest.xml b/.template/android/app/src/main/AndroidManifest.xml similarity index 100% rename from android/app/src/main/AndroidManifest.xml rename to .template/android/app/src/main/AndroidManifest.xml diff --git a/android/app/src/main/kotlin/co/nimblehq/flutter/template/MainActivity.kt b/.template/android/app/src/main/kotlin/co/nimblehq/flutter/template/MainActivity.kt similarity index 100% rename from android/app/src/main/kotlin/co/nimblehq/flutter/template/MainActivity.kt rename to .template/android/app/src/main/kotlin/co/nimblehq/flutter/template/MainActivity.kt diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/.template/android/app/src/main/res/drawable-v21/launch_background.xml similarity index 100% rename from android/app/src/main/res/drawable-v21/launch_background.xml rename to .template/android/app/src/main/res/drawable-v21/launch_background.xml diff --git a/android/app/src/main/res/drawable/launch_background.xml b/.template/android/app/src/main/res/drawable/launch_background.xml similarity index 100% rename from android/app/src/main/res/drawable/launch_background.xml rename to .template/android/app/src/main/res/drawable/launch_background.xml diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/.template/android/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to .template/android/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/.template/android/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to .template/android/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/.template/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to .template/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/.template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to .template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/.template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to .template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/android/app/src/main/res/values-night/styles.xml b/.template/android/app/src/main/res/values-night/styles.xml similarity index 100% rename from android/app/src/main/res/values-night/styles.xml rename to .template/android/app/src/main/res/values-night/styles.xml diff --git a/android/app/src/main/res/values/strings.xml b/.template/android/app/src/main/res/values/strings.xml similarity index 100% rename from android/app/src/main/res/values/strings.xml rename to .template/android/app/src/main/res/values/strings.xml diff --git a/android/app/src/main/res/values/styles.xml b/.template/android/app/src/main/res/values/styles.xml similarity index 100% rename from android/app/src/main/res/values/styles.xml rename to .template/android/app/src/main/res/values/styles.xml diff --git a/android/app/src/profile/AndroidManifest.xml b/.template/android/app/src/profile/AndroidManifest.xml similarity index 100% rename from android/app/src/profile/AndroidManifest.xml rename to .template/android/app/src/profile/AndroidManifest.xml diff --git a/android/app/src/staging/res/values/strings.xml b/.template/android/app/src/staging/res/values/strings.xml similarity index 100% rename from android/app/src/staging/res/values/strings.xml rename to .template/android/app/src/staging/res/values/strings.xml diff --git a/android/build.gradle b/.template/android/build.gradle similarity index 100% rename from android/build.gradle rename to .template/android/build.gradle diff --git a/android/gradle.properties b/.template/android/gradle.properties similarity index 100% rename from android/gradle.properties rename to .template/android/gradle.properties diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/.template/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from android/gradle/wrapper/gradle-wrapper.properties rename to .template/android/gradle/wrapper/gradle-wrapper.properties diff --git a/android/settings.gradle b/.template/android/settings.gradle similarity index 100% rename from android/settings.gradle rename to .template/android/settings.gradle diff --git a/assets/fonts/neuzeit.otf b/.template/assets/fonts/neuzeit.otf similarity index 100% rename from assets/fonts/neuzeit.otf rename to .template/assets/fonts/neuzeit.otf diff --git a/assets/images/nimble_logo.png b/.template/assets/images/nimble_logo.png similarity index 100% rename from assets/images/nimble_logo.png rename to .template/assets/images/nimble_logo.png diff --git a/build.yaml b/.template/build.yaml similarity index 100% rename from build.yaml rename to .template/build.yaml diff --git a/integration_test/my_home_page_test.dart b/.template/integration_test/my_home_page_test.dart similarity index 100% rename from integration_test/my_home_page_test.dart rename to .template/integration_test/my_home_page_test.dart diff --git a/integration_test/real_app_test.dart b/.template/integration_test/real_app_test.dart similarity index 100% rename from integration_test/real_app_test.dart rename to .template/integration_test/real_app_test.dart diff --git a/integration_test/utils/test_util.dart b/.template/integration_test/utils/test_util.dart similarity index 100% rename from integration_test/utils/test_util.dart rename to .template/integration_test/utils/test_util.dart diff --git a/ios/.gitignore b/.template/ios/.gitignore similarity index 100% rename from ios/.gitignore rename to .template/ios/.gitignore diff --git a/ios/Flutter/AppFrameworkInfo.plist b/.template/ios/Flutter/AppFrameworkInfo.plist similarity index 97% rename from ios/Flutter/AppFrameworkInfo.plist rename to .template/ios/Flutter/AppFrameworkInfo.plist index 9367d483..8d4492f9 100644 --- a/ios/Flutter/AppFrameworkInfo.plist +++ b/.template/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 8.0 + 9.0 diff --git a/ios/Flutter/Debug.xcconfig b/.template/ios/Flutter/Debug.xcconfig similarity index 100% rename from ios/Flutter/Debug.xcconfig rename to .template/ios/Flutter/Debug.xcconfig diff --git a/ios/Flutter/Release.xcconfig b/.template/ios/Flutter/Release.xcconfig similarity index 100% rename from ios/Flutter/Release.xcconfig rename to .template/ios/Flutter/Release.xcconfig diff --git a/ios/Podfile b/.template/ios/Podfile similarity index 100% rename from ios/Podfile rename to .template/ios/Podfile diff --git a/ios/Podfile.lock b/.template/ios/Podfile.lock similarity index 68% rename from ios/Podfile.lock rename to .template/ios/Podfile.lock index 9bb92397..9fe1b2e5 100644 --- a/ios/Podfile.lock +++ b/.template/ios/Podfile.lock @@ -2,12 +2,15 @@ PODS: - Flutter (1.0.0) - flutter_config (0.0.1): - Flutter + - integration_test (0.0.1): + - Flutter - package_info_plus (0.4.5): - Flutter DEPENDENCIES: - Flutter (from `Flutter`) - flutter_config (from `.symlinks/plugins/flutter_config/ios`) + - integration_test (from `.symlinks/plugins/integration_test/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) EXTERNAL SOURCES: @@ -15,14 +18,17 @@ EXTERNAL SOURCES: :path: Flutter flutter_config: :path: ".symlinks/plugins/flutter_config/ios" + integration_test: + :path: ".symlinks/plugins/integration_test/ios" package_info_plus: :path: ".symlinks/plugins/package_info_plus/ios" SPEC CHECKSUMS: - Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c + Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a flutter_config: 2226c1df19c78fe34a05eb7f1363445f18e76fc1 + integration_test: a1e7d09bd98eca2fc37aefd79d4f41ad37bdbbe5 package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c -COCOAPODS: 1.10.2 +COCOAPODS: 1.11.3 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/.template/ios/Runner.xcodeproj/project.pbxproj similarity index 99% rename from ios/Runner.xcodeproj/project.pbxproj rename to .template/ios/Runner.xcodeproj/project.pbxproj index 206275d0..f0fcd791 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/.template/ios/Runner.xcodeproj/project.pbxproj @@ -167,7 +167,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1020; + LastUpgradeCheck = 1300; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/.template/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to .template/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/.template/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to .template/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/.template/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to .template/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/production.xcscheme b/.template/ios/Runner.xcodeproj/xcshareddata/xcschemes/production.xcscheme similarity index 100% rename from ios/Runner.xcodeproj/xcshareddata/xcschemes/production.xcscheme rename to .template/ios/Runner.xcodeproj/xcshareddata/xcschemes/production.xcscheme diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/staging.xcscheme b/.template/ios/Runner.xcodeproj/xcshareddata/xcschemes/staging.xcscheme similarity index 100% rename from ios/Runner.xcodeproj/xcshareddata/xcschemes/staging.xcscheme rename to .template/ios/Runner.xcodeproj/xcshareddata/xcschemes/staging.xcscheme diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/.template/ios/Runner.xcworkspace/contents.xcworkspacedata similarity index 100% rename from ios/Runner.xcworkspace/contents.xcworkspacedata rename to .template/ios/Runner.xcworkspace/contents.xcworkspacedata diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/.template/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to .template/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/.template/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to .template/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/ios/Runner/AppDelegate.swift b/.template/ios/Runner/AppDelegate.swift similarity index 100% rename from ios/Runner/AppDelegate.swift rename to .template/ios/Runner/AppDelegate.swift diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/.template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json rename to .template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/.template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png rename to .template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/.template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png rename to .template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/.template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png rename to .template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/.template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png rename to .template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/.template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png rename to .template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/.template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png rename to .template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/.template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png rename to .template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/.template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png rename to .template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/.template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png rename to .template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/.template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png rename to .template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/.template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png rename to .template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/.template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png rename to .template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/.template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png rename to .template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/.template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png rename to .template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/.template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png rename to .template/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/.template/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json rename to .template/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/.template/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png rename to .template/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/.template/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png rename to .template/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/.template/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png rename to .template/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/.template/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md rename to .template/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/.template/ios/Runner/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from ios/Runner/Base.lproj/LaunchScreen.storyboard rename to .template/ios/Runner/Base.lproj/LaunchScreen.storyboard diff --git a/ios/Runner/Base.lproj/Main.storyboard b/.template/ios/Runner/Base.lproj/Main.storyboard similarity index 100% rename from ios/Runner/Base.lproj/Main.storyboard rename to .template/ios/Runner/Base.lproj/Main.storyboard diff --git a/ios/Runner/Info.plist b/.template/ios/Runner/Info.plist similarity index 100% rename from ios/Runner/Info.plist rename to .template/ios/Runner/Info.plist diff --git a/ios/Runner/Runner-Bridging-Header.h b/.template/ios/Runner/Runner-Bridging-Header.h similarity index 100% rename from ios/Runner/Runner-Bridging-Header.h rename to .template/ios/Runner/Runner-Bridging-Header.h diff --git a/l10n.yaml b/.template/l10n.yaml similarity index 100% rename from l10n.yaml rename to .template/l10n.yaml diff --git a/lib/api/api_service.dart b/.template/lib/api/api_service.dart similarity index 100% rename from lib/api/api_service.dart rename to .template/lib/api/api_service.dart diff --git a/lib/api/exception/network_exceptions.dart b/.template/lib/api/exception/network_exceptions.dart similarity index 100% rename from lib/api/exception/network_exceptions.dart rename to .template/lib/api/exception/network_exceptions.dart diff --git a/lib/api/repository/credential_repository.dart b/.template/lib/api/repository/credential_repository.dart similarity index 100% rename from lib/api/repository/credential_repository.dart rename to .template/lib/api/repository/credential_repository.dart diff --git a/lib/di/interceptor/app_interceptor.dart b/.template/lib/di/interceptor/app_interceptor.dart similarity index 100% rename from lib/di/interceptor/app_interceptor.dart rename to .template/lib/di/interceptor/app_interceptor.dart diff --git a/lib/di/provider/dio_provider.dart b/.template/lib/di/provider/dio_provider.dart similarity index 100% rename from lib/di/provider/dio_provider.dart rename to .template/lib/di/provider/dio_provider.dart diff --git a/lib/env.dart b/.template/lib/env.dart similarity index 100% rename from lib/env.dart rename to .template/lib/env.dart diff --git a/lib/l10n/app_en.arb b/.template/lib/l10n/app_en.arb similarity index 100% rename from lib/l10n/app_en.arb rename to .template/lib/l10n/app_en.arb diff --git a/lib/l10n/app_th.arb b/.template/lib/l10n/app_th.arb similarity index 100% rename from lib/l10n/app_th.arb rename to .template/lib/l10n/app_th.arb diff --git a/lib/l10n/app_vi.arb b/.template/lib/l10n/app_vi.arb similarity index 100% rename from lib/l10n/app_vi.arb rename to .template/lib/l10n/app_vi.arb diff --git a/lib/main.dart b/.template/lib/main.dart similarity index 100% rename from lib/main.dart rename to .template/lib/main.dart diff --git a/lib/model/response/user_response.dart b/.template/lib/model/response/user_response.dart similarity index 100% rename from lib/model/response/user_response.dart rename to .template/lib/model/response/user_response.dart diff --git a/pubspec.lock b/.template/pubspec.lock similarity index 100% rename from pubspec.lock rename to .template/pubspec.lock diff --git a/pubspec.yaml b/.template/pubspec.yaml similarity index 100% rename from pubspec.yaml rename to .template/pubspec.yaml diff --git a/test/api/repository/credential_repository_test.dart b/.template/test/api/repository/credential_repository_test.dart similarity index 100% rename from test/api/repository/credential_repository_test.dart rename to .template/test/api/repository/credential_repository_test.dart diff --git a/test/mocks/generate_mocks.dart b/.template/test/mocks/generate_mocks.dart similarity index 100% rename from test/mocks/generate_mocks.dart rename to .template/test/mocks/generate_mocks.dart diff --git a/test_driver/integration_test.dart b/.template/test_driver/integration_test.dart similarity index 100% rename from test_driver/integration_test.dart rename to .template/test_driver/integration_test.dart diff --git a/README.md b/README.md index 6782a493..a472b7d5 100644 --- a/README.md +++ b/README.md @@ -8,48 +8,6 @@ Clone the repository `git clone git@github.com:nimblehq/flutter_templates.git` -## Prerequisite - -- Flutter 2.2 -- Flutter version manager (recommend): [fvm](https://fvm.app/) - -## Getting Started - -### Setup - -- Create these `.env` files in the root directory according to the flavors and add the required - environment variables into them. The example environment variable is in `.env.sample`. - - - Staging: `.env.staging` - - - Production: `.env` - -- Run code generator - - - `$ fvm flutter packages pub run build_runner build --delete-conflicting-outputs` - -### Run - -- Run the app with the desire app flavor: - - - Staging: `$ fvm flutter run --flavor staging` - - - Production: `$ fvm flutter run --flavor production` - -### Test - -- Run unit testing: - - - `$ fvm flutter test .` - -- Run integration testing: - - - `$ fvm flutter drive --driver=test_driver/integration_test.dart --target=integration_test/{test_file}.dart --flavor staging` - - - For example: - - `$ fvm flutter drive --driver=test_driver/integration_test.dart --target=integration_test/my_home_page_test.dart --flavor staging` - ## Use the template ### Setup a new project From 23237b3f628396ee0425033be46038f75730fed3 Mon Sep 17 00:00:00 2001 From: Tran Manh Date: Tue, 12 Apr 2022 10:11:17 +0700 Subject: [PATCH 4/8] [#66] Update project path on Makefile --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 51201a90..9c904f57 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ PYTHON3 := $(shell command -v python3 2> /dev/null) VENV_ACTIVATE=$(VENV_NAME)/bin/activate PYTHON=$(VENV_NAME)/bin/python3 +PROJECT_PATH=$(PWD)/.template PACKAGE_NAME= PROJECT_NAME= APP_NAME= @@ -40,7 +41,7 @@ prepare-dev: $(PYTHON) -m pip install enquiries init: prepare-dev - $(PYTHON) ./scripts/setup.py --project_path $(PWD) --package_name "$(PACKAGE_NAME)" --project_name "$(PROJECT_NAME)" --app_name "$(APP_NAME)" --app_version "$(APP_VERSION)" --build_number "$(BUILD_NUMBER)" + $(PYTHON) ./scripts/setup.py --project_path "$(PROJECT_PATH)" --package_name "$(PACKAGE_NAME)" --project_name "$(PROJECT_NAME)" --app_name "$(APP_NAME)" --app_version "$(APP_VERSION)" --build_number "$(BUILD_NUMBER)" test: prepare-dev $(PYTHON) ./scripts/test.py From 92169bcc03dcc128754f0399d309c3a861338654 Mon Sep 17 00:00:00 2001 From: Tran Manh Date: Tue, 12 Apr 2022 12:03:57 +0700 Subject: [PATCH 5/8] [#66] Update init script to generate project from .template and move project to root --- scripts/setup.py | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/scripts/setup.py b/scripts/setup.py index 903d174c..fc427360 100644 --- a/scripts/setup.py +++ b/scripts/setup.py @@ -365,7 +365,7 @@ def handleParameters(): return parser.parse_args() -def validateParameters(project): +def validate_parameters(project): # Check the mandatory fields should not be empty if not project.new_package or not project.new_project_name or not project.new_app_name: print("❌ PACKAGE_NAME, PROJECT_NAME and APP_NAME are required. Please fill the missing variables and try again!") @@ -384,6 +384,20 @@ def validateParameters(project): f"❌ Invalid App Version or Build Number: {project.app_version}+{project.build_number} (needs to follow standard pattern `app_version+build_number`. Eg: `1.0+1` or `0.1.0+1`)") sys.exit() +def move_project_to_root(project): + cur_dir = os.getcwd() + shutil.copytree(project.project_path, cur_dir, copy_function=shutil.move, dirs_exist_ok=True) + +def clean_up(): + cur_dir = os.getcwd() + template_files = ['.template', '.github'] + for template_file in template_files: + template_file_path = cur_dir + os.sep + template_file + if os.path.exists(template_file_path): + if (os.path.isdir(template_file_path)): + shutil.rmtree(template_file_path) + else: + os.remove(template_file_path) if __name__ == "__main__": args = handleParameters() @@ -396,7 +410,7 @@ def validateParameters(project): args.app_version, args.build_number ) - validateParameters(project) + validate_parameters(project) options = { 'none' : 'none', @@ -414,4 +428,9 @@ def validateParameters(project): ios.run() flutter = Flutter(project) flutter.run() + print('🤖 Generating project...') + move_project_to_root(project) + print('Would you like to remove `.template` and `.github` folder? (y/n)') + if input().lower() == 'y': + clean_up() print("=> 🚀 Done! App is ready to be tested 🙌") From b139cda0bf165aeb3b012ac6cbf21fdecad16294 Mon Sep 17 00:00:00 2001 From: Tran Manh Date: Fri, 15 Apr 2022 15:16:05 +0700 Subject: [PATCH 6/8] [#63] Upgrade MinimumOsVersion and CODEOWNERS --- .template/.github/CODEOWNERS | 8 +++----- .template/ios/Flutter/AppFrameworkInfo.plist | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.template/.github/CODEOWNERS b/.template/.github/CODEOWNERS index 702a7f76..0c80cf2b 100644 --- a/.template/.github/CODEOWNERS +++ b/.template/.github/CODEOWNERS @@ -1,8 +1,6 @@ -# Team Lead -* @manh-t - -# Team Members -* @doannimble @luongvo @markgravity +# Team +# @manh-t is the Team Lead +* @manh-t @doannimble @luongvo @markgravity # Engineering Leads CODEOWNERS @nimblehq/engineering-leads diff --git a/.template/ios/Flutter/AppFrameworkInfo.plist b/.template/ios/Flutter/AppFrameworkInfo.plist index 8d4492f9..ded19e29 100644 --- a/.template/ios/Flutter/AppFrameworkInfo.plist +++ b/.template/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 9.0 + 10.0 From 9fc7d438f10c4edea6ccda1b55d255e7af88a670 Mon Sep 17 00:00:00 2001 From: Tran Manh Date: Fri, 15 Apr 2022 15:49:16 +0700 Subject: [PATCH 7/8] [#66] Update cleanup step --- scripts/setup.py | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/scripts/setup.py b/scripts/setup.py index fc427360..cc62c7e5 100644 --- a/scripts/setup.py +++ b/scripts/setup.py @@ -388,16 +388,14 @@ def move_project_to_root(project): cur_dir = os.getcwd() shutil.copytree(project.project_path, cur_dir, copy_function=shutil.move, dirs_exist_ok=True) -def clean_up(): +def clean_up(file): cur_dir = os.getcwd() - template_files = ['.template', '.github'] - for template_file in template_files: - template_file_path = cur_dir + os.sep + template_file - if os.path.exists(template_file_path): - if (os.path.isdir(template_file_path)): - shutil.rmtree(template_file_path) - else: - os.remove(template_file_path) + file_path = cur_dir + os.sep + file + if os.path.exists(file_path): + if (os.path.isdir(file_path)): + shutil.rmtree(file_path) + else: + os.remove(file_path) if __name__ == "__main__": args = handleParameters() @@ -429,8 +427,8 @@ def clean_up(): flutter = Flutter(project) flutter.run() print('🤖 Generating project...') + # Remove the `.github` folder to avoid redundant workflow + clean_up('.github') move_project_to_root(project) - print('Would you like to remove `.template` and `.github` folder? (y/n)') - if input().lower() == 'y': - clean_up() - print("=> 🚀 Done! App is ready to be tested 🙌") + clean_up('.template') + print("=> 🚀 Done! Project is ready for the next development 🙌") From 1bba1528eedd4b662a8e03026b04b3adeee930ac Mon Sep 17 00:00:00 2001 From: Tran Manh Date: Fri, 15 Apr 2022 16:15:14 +0700 Subject: [PATCH 8/8] [#66] Update to remove files in cleanup step --- scripts/setup.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/scripts/setup.py b/scripts/setup.py index cc62c7e5..4709419c 100644 --- a/scripts/setup.py +++ b/scripts/setup.py @@ -388,14 +388,15 @@ def move_project_to_root(project): cur_dir = os.getcwd() shutil.copytree(project.project_path, cur_dir, copy_function=shutil.move, dirs_exist_ok=True) -def clean_up(file): +def clean_up(files: list[str]): cur_dir = os.getcwd() - file_path = cur_dir + os.sep + file - if os.path.exists(file_path): - if (os.path.isdir(file_path)): - shutil.rmtree(file_path) - else: - os.remove(file_path) + for file in files: + file_path = cur_dir + os.sep + file + if os.path.exists(file_path): + if (os.path.isdir(file_path)): + shutil.rmtree(file_path) + else: + os.remove(file_path) if __name__ == "__main__": args = handleParameters() @@ -428,7 +429,7 @@ def clean_up(file): flutter.run() print('🤖 Generating project...') # Remove the `.github` folder to avoid redundant workflow - clean_up('.github') + clean_up(['.github']) move_project_to_root(project) - clean_up('.template') + clean_up(['.template', 'LICENSE', 'Makefile']) print("=> 🚀 Done! Project is ready for the next development 🙌")