diff --git a/.github/workflows/pull_request_validation.yml b/.github/workflows/pull_request_validation.yml index d7ed896..39fca36 100644 --- a/.github/workflows/pull_request_validation.yml +++ b/.github/workflows/pull_request_validation.yml @@ -16,6 +16,12 @@ jobs: - name: 📚 Git Checkout uses: actions/checkout@v4 + - name: ♨️ Setup Java + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - name: 🐦 Setup Flutter uses: subosito/flutter-action@v2 with: @@ -23,6 +29,9 @@ jobs: cache: true cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }} + - name: 🛎️ Checking Flutter Version + run: flutter --version + - name: 📦 Install Dependencies run: flutter pub get @@ -32,9 +41,6 @@ jobs: - name: 🕵️ Analyze Code run: flutter analyze lib test - - name: ✨ Check Formatting - run: dart format --line-length 80 --set-exit-if-changed lib test - - name: 🏗️ Build APK (Production Flavor) run: flutter build apk --release --flavor production -t lib/main_production.dart diff --git a/.metadata b/.metadata index 1038231..c689480 100644 --- a/.metadata +++ b/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: "5dcb86f68f239346676ceb1ed1ea385bd215fba1" + revision: "2663184aa79047d0a33a14a3b607954f8fdd8730" channel: "stable" project_type: app @@ -13,11 +13,11 @@ project_type: app migration: platforms: - platform: root - create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 - base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 - - platform: ios - create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 - base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 + base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 + - platform: android + create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 + base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 # User provided section diff --git a/.run/Development Release.run.xml b/.run/Development Release.run.xml deleted file mode 100644 index 4c505c0..0000000 --- a/.run/Development Release.run.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - \ No newline at end of file diff --git a/.run/Staging Release.run.xml b/.run/Staging Release.run.xml deleted file mode 100644 index e4c17dd..0000000 --- a/.run/Staging Release.run.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - \ No newline at end of file diff --git a/android/.gitignore b/android/.gitignore index 6f56801..55afd91 100644 --- a/android/.gitignore +++ b/android/.gitignore @@ -7,7 +7,7 @@ gradle-wrapper.jar GeneratedPluginRegistrant.java # Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +# See https://flutter.dev/to/reference-keystore key.properties **/*.keystore **/*.jks diff --git a/android/app/build.gradle b/android/app/build.gradle index 2ea5713..82f1dca 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -4,37 +4,22 @@ plugins { // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id "dev.flutter.flutter-gradle-plugin" } - -def localProperties = new Properties() -def localPropertiesFile = rootProject.file("local.properties") -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader("UTF-8") { reader -> - localProperties.load(reader) - } -} - -def flutterVersionCode = localProperties.getProperty("flutter.versionCode") -if (flutterVersionCode == null) { - flutterVersionCode = "1" -} - -def flutterVersionName = localProperties.getProperty("flutter.versionName") -if (flutterVersionName == null) { - flutterVersionName = "1.0" -} - - // TODO: Change the appName, it will be used as app label -def appName = "Flutter Template" +def appName = "Monstarlab Flutter Template" // TODO: Change the applicationId for production // On staging it will add .staging and on development it will add .development as suffix. -def applicationId = "com.example.flutter_template" +def applicationId = "com.monstarlab.flutter" + +ext { + androidMinSdkVersion = 21 + androidCompileAndTargetSdkVersion = 34 +} android { namespace = "$applicationId" - compileSdk = flutter.compileSdkVersion + compileSdk = androidCompileAndTargetSdkVersion ndkVersion = flutter.ndkVersion compileOptions { @@ -49,11 +34,11 @@ android { defaultConfig { applicationId = "$applicationId" // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdk = flutter.minSdkVersion - targetSdk = flutter.targetSdkVersion - versionCode = flutterVersionCode.toInteger() - versionName = flutterVersionName + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = androidMinSdkVersion + targetSdk = androidCompileAndTargetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName } buildTypes { diff --git a/android/app/src/main/kotlin/com/example/flutter_template/MainActivity.kt b/android/app/src/main/kotlin/com/monstarlab/flutter/MainActivity.kt similarity index 71% rename from android/app/src/main/kotlin/com/example/flutter_template/MainActivity.kt rename to android/app/src/main/kotlin/com/monstarlab/flutter/MainActivity.kt index 20abea6..3c5f278 100644 --- a/android/app/src/main/kotlin/com/example/flutter_template/MainActivity.kt +++ b/android/app/src/main/kotlin/com/monstarlab/flutter/MainActivity.kt @@ -1,4 +1,4 @@ -package com.example.flutter_template +package com.monstarlab.flutter import io.flutter.embedding.android.FlutterActivity diff --git a/android/build.gradle b/android/build.gradle index bc95f5a..361d70f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -5,9 +5,7 @@ allprojects { } } -rootProject.buildDir = '../build' - - +rootProject.buildDir = "../build" // [NStack] the namespace property is null within // the android block of the build.gradle file for the nstack sdk. // Additionally, the Kotlin Gradle plugin is using a very old version there. diff --git a/android/gradle.properties b/android/gradle.properties index 3b5b324..2597170 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError +org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true diff --git a/android/settings.gradle b/android/settings.gradle index 536165d..ea7f114 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -18,7 +18,7 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "7.3.0" apply false + id "com.android.application" version '7.4.2' apply false id "org.jetbrains.kotlin.android" version "1.7.10" apply false } diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index b010ad0..566ba09 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -368,7 +368,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { - APP_DISPLAY_NAME = "[DEV] Application Name"; + APP_DISPLAY_NAME = "[DEV] Monstarlab Flutter Template"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; @@ -378,7 +378,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterTemplate.development; + PRODUCT_BUNDLE_IDENTIFIER = com.monstarlab.flutter.development; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -497,7 +497,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { - APP_DISPLAY_NAME = "[DEV] Application Name"; + APP_DISPLAY_NAME = "[DEV] Monstarlab Flutter Template"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; @@ -507,7 +507,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterTemplate.development; + PRODUCT_BUNDLE_IDENTIFIER = com.monstarlab.flutter.development; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -520,7 +520,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { - APP_DISPLAY_NAME = "[DEV] Application Name"; + APP_DISPLAY_NAME = "[DEV] Monstarlab Flutter Template"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; @@ -530,7 +530,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterTemplate.development; + PRODUCT_BUNDLE_IDENTIFIER = com.monstarlab.flutter.development; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -597,7 +597,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { - APP_DISPLAY_NAME = "[STG] Application Name"; + APP_DISPLAY_NAME = "[STG] Monstarlab Flutter Template"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; @@ -607,7 +607,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterTemplate.staging; + PRODUCT_BUNDLE_IDENTIFIER = com.monstarlab.flutter.staging; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -672,7 +672,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { - APP_DISPLAY_NAME = "[STG] Application Name"; + APP_DISPLAY_NAME = "[STG] Monstarlab Flutter Template"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; @@ -682,7 +682,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterTemplate.staging; + PRODUCT_BUNDLE_IDENTIFIER = com.monstarlab.flutter.staging; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -744,7 +744,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { - APP_DISPLAY_NAME = "[STG] Application Name"; + APP_DISPLAY_NAME = "[STG] Monstarlab Flutter Template"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; @@ -754,7 +754,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterTemplate.staging; + PRODUCT_BUNDLE_IDENTIFIER = com.monstarlab.flutter.staging; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -821,7 +821,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { - APP_DISPLAY_NAME = "Application Name"; + APP_DISPLAY_NAME = "Monstarlab Flutter Template"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; @@ -831,7 +831,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterTemplate; + PRODUCT_BUNDLE_IDENTIFIER = com.monstarlab.flutter; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -896,7 +896,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { - APP_DISPLAY_NAME = "Application Name"; + APP_DISPLAY_NAME = "Monstarlab Flutter Template"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; @@ -906,7 +906,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterTemplate; + PRODUCT_BUNDLE_IDENTIFIER = com.monstarlab.flutter; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -968,7 +968,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { - APP_DISPLAY_NAME = "Application Name"; + APP_DISPLAY_NAME = "Monstarlab Flutter Template"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; @@ -978,7 +978,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterTemplate; + PRODUCT_BUNDLE_IDENTIFIER = com.monstarlab.flutter; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 9074fee..6266644 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ import Flutter import UIKit -@UIApplicationMain +@main @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, diff --git a/lib/presentation/app.dart b/lib/presentation/app.dart index 1b6f5c1..127774d 100644 --- a/lib/presentation/app.dart +++ b/lib/presentation/app.dart @@ -18,7 +18,8 @@ class App extends StatelessWidget { darkTheme: AppTheme.fromBrightness(Brightness.dark), // TODO: Set to [ThemeMode.light] if your app only supports light mode themeMode: ThemeMode.system, - title: 'Project Name', + // TODO: Change Project Name Here + title: 'Monstarlab Flutter Template', builder: (c, widget) { if (widget == null) { return const SizedBox(); diff --git a/lib/presentation/routes/router.dart b/lib/presentation/routes/router.dart index a040b5c..15a0e41 100644 --- a/lib/presentation/routes/router.dart +++ b/lib/presentation/routes/router.dart @@ -7,7 +7,7 @@ import 'package:flutter_template/presentation/routes/router.gr.dart'; /// for example, Bottom navigation child views, tab views, etc. /// @AutoRouterConfig() -class AppRouter extends $AppRouter { +class AppRouter extends RootStackRouter { @override RouteType get defaultRouteType => const RouteType.material(); diff --git a/pubspec.yaml b/pubspec.yaml index f2c35e2..19d424b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -31,47 +31,47 @@ dependencies: ref: v0.5.1 # UI - cupertino_icons: ^1.0.6 - flutter_svg: ^2.0.9 - flutter_sticky_header: ^0.6.5 + cupertino_icons: ^1.0.8 + flutter_svg: ^2.0.9 # Change this with caution + flutter_sticky_header: ^0.7.0 auto_size_text: ^3.0.0 theme_tailor_annotation: ^3.0.1 # Data - dio: ^5.4.0 - freezed_annotation: ^2.4.1 - json_annotation: ^4.8.1 - retrofit: ^4.0.3 + dio: ^5.7.0 + freezed_annotation: ^2.4.4 + json_annotation: ^4.9.0 + retrofit: ^4.4.1 # Utility - device_info_plus: ^9.1.1 - package_info_plus: ^5.0.1 + device_info_plus: 11.0.0 + package_info_plus: ^8.0.3 # Persistence - flutter_secure_storage: ^9.0.0 - shared_preferences: ^2.2.2 + flutter_secure_storage: ^9.2.2 + shared_preferences: ^2.3.2 # Architecture - get_it: ^7.6.6 - injectable: ^2.3.2 - auto_route: ^7.8.4 - flutter_bloc: ^8.1.3 + get_it: ^8.0.0 + injectable: ^2.5.0 + auto_route: ^9.2.2 + flutter_bloc: ^8.1.6 dev_dependencies: flutter_test: sdk: flutter - build_runner: ^2.4.7 + build_runner: ^2.4.13 theme_tailor: ^3.0.1 - freezed: ^2.4.6 - json_serializable: ^6.7.1 - injectable_generator: ^2.4.1 - auto_route_generator: ^7.3.2 - retrofit_generator: ^8.0.6 - monstarlab_lints: ^1.0.2 + freezed: ^2.5.7 + json_serializable: ^6.8.0 + injectable_generator: ^2.6.2 + auto_route_generator: ^9.0.0 + retrofit_generator: ^9.1.3 + monstarlab_lints: ^1.0.4 # Simplified work with assets - flutter_gen_runner: ^5.4.0 + flutter_gen_runner: ^5.8.0 flutter_gen: integrations: