From 8e25ae1f44846dbf5996f44ff1d5bab68b301014 Mon Sep 17 00:00:00 2001 From: Bhargav Raviya <46953122+bhargavraviya@users.noreply.github.com> Date: Thu, 30 Nov 2023 21:36:41 +0530 Subject: [PATCH] upgrade flutter version - adaptive banner (#962) --- .../admob/adaptive_banner_example/.metadata | 30 +-- .../analysis_options.yaml | 28 --- .../android/app/build.gradle | 22 +- .../android/app/src/debug/AndroidManifest.xml | 3 +- .../android/app/src/main/AndroidManifest.xml | 23 +- .../MainActivity.kt | 0 .../app/src/profile/AndroidManifest.xml | 3 +- .../android/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../android/settings.gradle | 25 ++- .../ios/Flutter/Debug.xcconfig | 1 - .../ios/Flutter/Release.xcconfig | 1 - .../admob/adaptive_banner_example/ios/Podfile | 41 ---- .../ios/Runner.xcodeproj/project.pbxproj | 204 ++++++++++++------ .../contents.xcworkspacedata | 3 - .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin 564 -> 295 bytes .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin 1283 -> 406 bytes .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin 1588 -> 450 bytes .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin 1025 -> 282 bytes .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin 1716 -> 462 bytes .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin 1920 -> 704 bytes .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin 1283 -> 406 bytes .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin 1895 -> 586 bytes .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin 2665 -> 862 bytes .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin 2665 -> 862 bytes .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin 3831 -> 1674 bytes .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin 1888 -> 762 bytes .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin 3294 -> 1226 bytes .../Icon-App-83.5x83.5@2x.png | Bin 3612 -> 1418 bytes .../ios/Runner/Info.plist | 2 - .../ios/RunnerTests/RunnerTests.swift | 12 ++ .../adaptive_banner_example/pubspec.yaml | 75 +------ 32 files changed, 200 insertions(+), 281 deletions(-) rename samples/admob/adaptive_banner_example/android/app/src/main/kotlin/com/example/{banner_example => adaptive_banner_example}/MainActivity.kt (100%) delete mode 100644 samples/admob/adaptive_banner_example/ios/Podfile create mode 100644 samples/admob/adaptive_banner_example/ios/RunnerTests/RunnerTests.swift diff --git a/samples/admob/adaptive_banner_example/.metadata b/samples/admob/adaptive_banner_example/.metadata index 3c0cd78dd..7cc394df5 100644 --- a/samples/admob/adaptive_banner_example/.metadata +++ b/samples/admob/adaptive_banner_example/.metadata @@ -1,11 +1,11 @@ # This file tracks properties of this Flutter project. # Used by Flutter tool to assess capabilities and perform upgrades etc. # -# This file should be version controlled. +# This file should be version controlled and should not be manually edited. version: - revision: eb6d86ee27deecba4a83536aa20f366a6044895c - channel: stable + revision: "d211f42860350d914a5ad8102f9ec32764dc6d06" + channel: "stable" project_type: app @@ -13,26 +13,14 @@ project_type: app migration: platforms: - platform: root - create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c + create_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 + base_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 - platform: android - create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c + create_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 + base_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 - platform: ios - create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - - platform: linux - create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - - platform: macos - create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - - platform: web - create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - - platform: windows - create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c - base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c + create_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 + base_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 # User provided section diff --git a/samples/admob/adaptive_banner_example/analysis_options.yaml b/samples/admob/adaptive_banner_example/analysis_options.yaml index 61b6c4de1..f9b303465 100644 --- a/samples/admob/adaptive_banner_example/analysis_options.yaml +++ b/samples/admob/adaptive_banner_example/analysis_options.yaml @@ -1,29 +1 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at - # https://dart-lang.github.io/linter/lints/index.html. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/samples/admob/adaptive_banner_example/android/app/build.gradle b/samples/admob/adaptive_banner_example/android/app/build.gradle index e07c987b9..2a97bfc52 100644 --- a/samples/admob/adaptive_banner_example/android/app/build.gradle +++ b/samples/admob/adaptive_banner_example/android/app/build.gradle @@ -1,3 +1,9 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) { } } -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') if (flutterVersionCode == null) { flutterVersionCode = '1' @@ -21,11 +22,8 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { + namespace "com.example.adaptive_banner_example" compileSdkVersion flutter.compileSdkVersion ndkVersion flutter.ndkVersion @@ -46,10 +44,10 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.example.adaptive_banner_example" // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. minSdkVersion 19 multiDexEnabled true - targetSdkVersion 32 + targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } @@ -68,5 +66,5 @@ flutter { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation 'androidx.multidex:multidex:2.0.1' } diff --git a/samples/admob/adaptive_banner_example/android/app/src/debug/AndroidManifest.xml b/samples/admob/adaptive_banner_example/android/app/src/debug/AndroidManifest.xml index c789695ca..399f6981d 100644 --- a/samples/admob/adaptive_banner_example/android/app/src/debug/AndroidManifest.xml +++ b/samples/admob/adaptive_banner_example/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,4 @@ - + + android:name="io.flutter.embedding.android.NormalTheme" + android:resource="@style/NormalTheme" + /> - - + + - + - + \ No newline at end of file diff --git a/samples/admob/adaptive_banner_example/android/app/src/main/kotlin/com/example/banner_example/MainActivity.kt b/samples/admob/adaptive_banner_example/android/app/src/main/kotlin/com/example/adaptive_banner_example/MainActivity.kt similarity index 100% rename from samples/admob/adaptive_banner_example/android/app/src/main/kotlin/com/example/banner_example/MainActivity.kt rename to samples/admob/adaptive_banner_example/android/app/src/main/kotlin/com/example/adaptive_banner_example/MainActivity.kt diff --git a/samples/admob/adaptive_banner_example/android/app/src/profile/AndroidManifest.xml b/samples/admob/adaptive_banner_example/android/app/src/profile/AndroidManifest.xml index c789695ca..399f6981d 100644 --- a/samples/admob/adaptive_banner_example/android/app/src/profile/AndroidManifest.xml +++ b/samples/admob/adaptive_banner_example/android/app/src/profile/AndroidManifest.xml @@ -1,5 +1,4 @@ - +