From 6715d849ad27f0a13200fd383d032922ea54b32c Mon Sep 17 00:00:00 2001 From: Felipe Sales Date: Thu, 30 May 2024 14:01:49 -0300 Subject: [PATCH 1/5] build: bump packages to Flutter 3.22.0 --- .../pages/home/widgets/appbar/web_app_bar.dart | 2 +- .../advantages_section/advantages_section.dart | 8 ++++---- .../home/widgets/sections/top_section.dart | 18 +++++++++--------- pubspec.yaml | 12 ++++++------ 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/app/pages/home/widgets/appbar/web_app_bar.dart b/lib/app/pages/home/widgets/appbar/web_app_bar.dart index 297e1c3..97134ff 100644 --- a/lib/app/pages/home/widgets/appbar/web_app_bar.dart +++ b/lib/app/pages/home/widgets/appbar/web_app_bar.dart @@ -38,7 +38,7 @@ class WebAppBar extends StatelessWidget { child: OutlinedButton( onPressed: () {}, style: ButtonStyle( - side: MaterialStateProperty.resolveWith( + side: WidgetStateProperty.resolveWith( (states) { return const BorderSide( color: AppColors.white, diff --git a/lib/app/pages/home/widgets/sections/advantages_section/advantages_section.dart b/lib/app/pages/home/widgets/sections/advantages_section/advantages_section.dart index de4491c..cba91c1 100644 --- a/lib/app/pages/home/widgets/sections/advantages_section/advantages_section.dart +++ b/lib/app/pages/home/widgets/sections/advantages_section/advantages_section.dart @@ -22,11 +22,11 @@ class AdvantagesSection extends StatelessWidget { bottom: BorderSide(color: AppColors.graniteGray), ), ), - child: Wrap( + child: const Wrap( alignment: WrapAlignment.spaceEvenly, runSpacing: 16, spacing: 16, - children: const [ + children: [ AdvantagesSectionHorizontal( iconData: Icons.connect_without_contact, title: AppTexts.moreThan100kDevelopers, @@ -56,11 +56,11 @@ class AdvantagesSection extends StatelessWidget { bottom: BorderSide(color: AppColors.graniteGray), ), ), - child: Wrap( + child: const Wrap( alignment: WrapAlignment.spaceEvenly, runSpacing: 16, spacing: 32, - children: const [ + children: [ AdvantagesSectionVertical( iconData: Icons.connect_without_contact, title: AppTexts.moreThan100kDevelopers, diff --git a/lib/app/pages/home/widgets/sections/top_section.dart b/lib/app/pages/home/widgets/sections/top_section.dart index 114167a..44e4a04 100644 --- a/lib/app/pages/home/widgets/sections/top_section.dart +++ b/lib/app/pages/home/widgets/sections/top_section.dart @@ -32,8 +32,8 @@ class TopSection extends StatelessWidget { child: Container( padding: const EdgeInsets.all(24), width: 450, - child: Column( - children: const [ + child: const Column( + children: [ Text( AppTexts.letsLearnFlutterWithTheseCourses, style: TextStyle( @@ -84,8 +84,8 @@ class TopSection extends StatelessWidget { child: Container( padding: const EdgeInsets.all(20), width: 360, - child: Column( - children: const [ + child: const Column( + children: [ Text( AppTexts.letsLearnFlutterWithTheseCourses, style: TextStyle( @@ -115,16 +115,16 @@ class TopSection extends StatelessWidget { ), ); } - return Column( + return const Column( children: [ - const AspectRatio( + AspectRatio( aspectRatio: 10 / 3, child: TopSectionImage(), ), Padding( - padding: const EdgeInsets.all(16), + padding: EdgeInsets.all(16), child: Column( - children: const [ + children: [ Text( AppTexts.letsLearnFlutterWithTheseCourses, textAlign: TextAlign.center, @@ -149,7 +149,7 @@ class TopSection extends StatelessWidget { ], ), ), - const Padding( + Padding( padding: EdgeInsets.symmetric(horizontal: 16), child: CustomSearchField(), ), diff --git a/pubspec.yaml b/pubspec.yaml index 094e7d6..67774eb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,22 +1,22 @@ name: fludemy description: FLUdemy. publish_to: 'none' -version: 2.0.0 +version: 2.0.1 environment: - sdk: '>=2.18.5 <3.0.0' + sdk: '>=3.3.0 <4.0.0' dependencies: auto_size_text: ^3.0.0 - cupertino_icons: ^1.0.5 - device_preview: ^1.1.0 + cupertino_icons: ^1.0.8 + device_preview: ^1.2.0 effective_dart: ^1.3.2 flutter: sdk: flutter - flutter_svg: ^1.1.6 + flutter_svg: ^2.0.10+1 dev_dependencies: - flutter_lints: ^2.0.1 + flutter_lints: ^4.0.0 flutter_test: sdk: flutter integration_test: From b739d3173c69421c8822ca3b5fd3f17166eeae0c Mon Sep 17 00:00:00 2001 From: Felipe Sales Date: Thu, 30 May 2024 14:13:41 -0300 Subject: [PATCH 2/5] build: bump android native scope to latest flutter versions --- android/.gitignore | 2 + android/app/build.gradle | 60 ++++++++---------- android/app/src/debug/AndroidManifest.xml | 6 +- android/app/src/main/AndroidManifest.xml | 28 ++++---- .../{fluttermy => fludemy}/MainActivity.kt | 3 +- .../app/src/main/res/values-night/styles.xml | 4 +- android/app/src/main/res/values/styles.xml | 4 +- android/app/src/profile/AndroidManifest.xml | 6 +- android/build.gradle | 21 ++---- android/gradle.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 3 +- android/settings.gradle | 30 ++++++--- ios/RunnerTests/RunnerTests.swift | 12 ++++ macos/RunnerTests/RunnerTests.swift | 12 ++++ web/icons/Icon-192.png | Bin 0 -> 5292 bytes web/icons/Icon-512.png | Bin 0 -> 8252 bytes web/icons/Icon-maskable-192.png | Bin 0 -> 5594 bytes web/icons/Icon-maskable-512.png | Bin 0 -> 20998 bytes 18 files changed, 109 insertions(+), 84 deletions(-) rename android/app/src/main/kotlin/com/example/{fluttermy => fludemy}/MainActivity.kt (66%) create mode 100644 ios/RunnerTests/RunnerTests.swift create mode 100644 macos/RunnerTests/RunnerTests.swift create mode 100644 web/icons/Icon-192.png create mode 100644 web/icons/Icon-512.png create mode 100644 web/icons/Icon-maskable-192.png create mode 100644 web/icons/Icon-maskable-512.png diff --git a/android/.gitignore b/android/.gitignore index 0a741cb..6f56801 100644 --- a/android/.gitignore +++ b/android/.gitignore @@ -9,3 +9,5 @@ GeneratedPluginRegistrant.java # Remember to never publicly share your keystore. # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app key.properties +**/*.keystore +**/*.jks diff --git a/android/app/build.gradle b/android/app/build.gradle index 12ebeec..9e68453 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,62 +1,58 @@ +plugins { + id "com.android.application" + id "kotlin-android" + // 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') +def localPropertiesFile = rootProject.file("local.properties") if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> + localPropertiesFile.withReader("UTF-8") { reader -> localProperties.load(reader) } } -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +def flutterVersionCode = localProperties.getProperty("flutter.versionCode") if (flutterVersionCode == null) { - flutterVersionCode = '1' + flutterVersionCode = "1" } -def flutterVersionName = localProperties.getProperty('flutter.versionName') +def flutterVersionName = localProperties.getProperty("flutter.versionName") if (flutterVersionName == null) { - flutterVersionName = '1.0' + flutterVersionName = "1.0" } -apply plugin: 'com.android.application' -apply plugin: 'com.google.gms.google-services' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { - compileSdkVersion 30 + namespace = "com.example.fludemy" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion - sourceSets { - main.java.srcDirs += 'src/main/kotlin' + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.fludemy" - minSdkVersion 16 - targetSdkVersion 30 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName + applicationId = "com.example.fludemy" + // 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 } buildTypes { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug + signingConfig = signingConfigs.debug } } } flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation platform('com.google.firebase:firebase-bom:26.5.0') - implementation 'com.google.firebase:firebase-analytics-ktx' + source = "../.." } diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 20bc8b6..399f698 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,6 +1,6 @@ - - diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index a975aa9..fa41f7b 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,11 +1,13 @@ - - + - - @@ -38,4 +31,15 @@ android:name="flutterEmbedding" android:value="2" /> + + + + + + + diff --git a/android/app/src/main/kotlin/com/example/fluttermy/MainActivity.kt b/android/app/src/main/kotlin/com/example/fludemy/MainActivity.kt similarity index 66% rename from android/app/src/main/kotlin/com/example/fluttermy/MainActivity.kt rename to android/app/src/main/kotlin/com/example/fludemy/MainActivity.kt index 9fbcb93..7b638b5 100644 --- a/android/app/src/main/kotlin/com/example/fluttermy/MainActivity.kt +++ b/android/app/src/main/kotlin/com/example/fludemy/MainActivity.kt @@ -2,5 +2,4 @@ package com.example.fludemy import io.flutter.embedding.android.FlutterActivity -class MainActivity: FlutterActivity() { -} +class MainActivity: FlutterActivity() diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml index 449a9f9..06952be 100644 --- a/android/app/src/main/res/values-night/styles.xml +++ b/android/app/src/main/res/values-night/styles.xml @@ -3,14 +3,14 @@