From 9df6b7bbea0b545957a4ab889939613f8c1de610 Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Wed, 18 Jun 2025 13:33:30 +0200 Subject: [PATCH] android config to handle google mobile ad --- Frontend/android/app/build.gradle | 24 +- .../android/app/src/main/AndroidManifest.xml | 4 + .../mzansiinnovationhub/mih}/MainActivity.kt | 2 +- Frontend/android/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- Frontend/android/settings.gradle | 1 + Frontend/ios/Podfile.lock | 80 +--- Frontend/ios/Runner.xcodeproj/project.pbxproj | 18 - .../xcshareddata/xcschemes/Runner.xcscheme | 2 + Frontend/pubspec.lock | 358 ++++++++---------- 10 files changed, 202 insertions(+), 299 deletions(-) rename Frontend/android/app/src/main/kotlin/{com/example/patient_manager => za/co/mzansiinnovationhub/mih}/MainActivity.kt (98%) diff --git a/Frontend/android/app/build.gradle b/Frontend/android/app/build.gradle index ebe7c415..897a6253 100644 --- a/Frontend/android/app/build.gradle +++ b/Frontend/android/app/build.gradle @@ -31,9 +31,9 @@ if (keystorePropertiesFile.exists()) { android { namespace "za.co.mzansiinnovationhub.mih" compileSdkVersion flutter.compileSdkVersion - ndkVersion = "27.0.12077973" + // ndkVersion = "27.0.12077973" // ndkVersion flutter.ndkVersion - compileSdkVersion 35 + // compileSdkVersion 35 compileOptions { sourceCompatibility JavaVersion.VERSION_17 @@ -54,9 +54,10 @@ android { // 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. minSdkVersion 24 //flutter.minSdkVersion - targetSdkVersion 34 //flutter.targetSdkVersion + targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName + multiDexEnabled true } signingConfigs { @@ -84,8 +85,21 @@ flutter { dependencies { // implementation("com.google.android.material:material:") - implementation("com.google.android.material:material:1.12.0") + implementation "com.google.android.material:material:1.12.0" + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" + implementation(platform("org.jetbrains.kotlin:kotlin-bom:$kotlin_version")) // implementation 'com.huawei.agconnect:agconnect-core:1.5.2.300' } -// apply plugin: 'com.huawei.agconnect' \ No newline at end of file +// apply plugin: 'com.huawei.agconnect' +configurations.all { + resolutionStrategy { + eachDependency { details -> + if (details.requested.group == 'org.jetbrains.kotlin') { + if (!details.requested.version.startsWith(rootProject.ext.kotlin_version)) { + details.useVersion rootProject.ext.kotlin_version + } + } + } + } +} diff --git a/Frontend/android/app/src/main/AndroidManifest.xml b/Frontend/android/app/src/main/AndroidManifest.xml index 9a6761d7..b94bfa1b 100644 --- a/Frontend/android/app/src/main/AndroidManifest.xml +++ b/Frontend/android/app/src/main/AndroidManifest.xml @@ -46,6 +46,10 @@ + + diff --git a/Frontend/android/app/src/main/kotlin/com/example/patient_manager/MainActivity.kt b/Frontend/android/app/src/main/kotlin/za/co/mzansiinnovationhub/mih/MainActivity.kt similarity index 98% rename from Frontend/android/app/src/main/kotlin/com/example/patient_manager/MainActivity.kt rename to Frontend/android/app/src/main/kotlin/za/co/mzansiinnovationhub/mih/MainActivity.kt index 57ffce9d..3ba56267 100644 --- a/Frontend/android/app/src/main/kotlin/com/example/patient_manager/MainActivity.kt +++ b/Frontend/android/app/src/main/kotlin/za/co/mzansiinnovationhub/mih/MainActivity.kt @@ -3,4 +3,4 @@ package za.co.mzansiinnovationhub.mih import io.flutter.embedding.android.FlutterFragmentActivity class MainActivity: FlutterFragmentActivity() { -} +} \ No newline at end of file diff --git a/Frontend/android/build.gradle b/Frontend/android/build.gradle index ed833606..0e62ca7d 100644 --- a/Frontend/android/build.gradle +++ b/Frontend/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '2.0.20' + ext.kotlin_version = '2.1.21' repositories { google() mavenCentral() @@ -7,7 +7,7 @@ buildscript { } dependencies { - // classpath "com.android.tools.build:gradle:8.8.0" + classpath "com.android.tools.build:gradle:8.8.1" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // classpath 'com.huawei.agconnect:agcp:1.5.2.300' } @@ -25,9 +25,9 @@ rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } -subprojects { - project.evaluationDependsOn(':app') -} +//subprojects { +// project.evaluationDependsOn(':app') +//} tasks.register("clean", Delete) { delete rootProject.buildDir diff --git a/Frontend/android/gradle/wrapper/gradle-wrapper.properties b/Frontend/android/gradle/wrapper/gradle-wrapper.properties index df97d72b..79eb9d00 100644 --- a/Frontend/android/gradle/wrapper/gradle-wrapper.properties +++ b/Frontend/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/Frontend/android/settings.gradle b/Frontend/android/settings.gradle index d6f88193..b97b87ee 100644 --- a/Frontend/android/settings.gradle +++ b/Frontend/android/settings.gradle @@ -18,6 +18,7 @@ pluginManagement { plugins { id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false + id "org.jetbrains.kotlin.android" version "2.1.21" apply false } } diff --git a/Frontend/ios/Podfile.lock b/Frontend/ios/Podfile.lock index ae6295f1..ef183a27 100644 --- a/Frontend/ios/Podfile.lock +++ b/Frontend/ios/Podfile.lock @@ -47,63 +47,17 @@ PODS: - geolocator_apple (1.2.0): - Flutter - FlutterMacOS - - GoogleDataTransport (10.1.0): - - nanopb (~> 3.30910.0) - - PromisesObjC (~> 2.4) - - GoogleMLKit/BarcodeScanning (7.0.0): - - GoogleMLKit/MLKitCore - - MLKitBarcodeScanning (~> 6.0.0) - - GoogleMLKit/MLKitCore (7.0.0): - - MLKitCommon (~> 12.0.0) - - GoogleToolboxForMac/Defines (4.2.1) - - GoogleToolboxForMac/Logger (4.2.1): - - GoogleToolboxForMac/Defines (= 4.2.1) - - "GoogleToolboxForMac/NSData+zlib (4.2.1)": - - GoogleToolboxForMac/Defines (= 4.2.1) - - GoogleUtilities/Environment (8.0.2): - - GoogleUtilities/Privacy - - GoogleUtilities/Logger (8.0.2): - - GoogleUtilities/Environment - - GoogleUtilities/Privacy - - GoogleUtilities/Privacy (8.0.2) - - GoogleUtilities/UserDefaults (8.0.2): - - GoogleUtilities/Logger - - GoogleUtilities/Privacy - - GTMSessionFetcher/Core (3.5.0) - local_auth_darwin (0.0.1): - Flutter - FlutterMacOS - - MLImage (1.0.0-beta6) - - MLKitBarcodeScanning (6.0.0): - - MLKitCommon (~> 12.0) - - MLKitVision (~> 8.0) - - MLKitCommon (12.0.0): - - GoogleDataTransport (~> 10.0) - - GoogleToolboxForMac/Logger (< 5.0, >= 4.2.1) - - "GoogleToolboxForMac/NSData+zlib (< 5.0, >= 4.2.1)" - - GoogleUtilities/Logger (~> 8.0) - - GoogleUtilities/UserDefaults (~> 8.0) - - GTMSessionFetcher/Core (< 4.0, >= 3.3.2) - - MLKitVision (8.0.0): - - GoogleToolboxForMac/Logger (< 5.0, >= 4.2.1) - - "GoogleToolboxForMac/NSData+zlib (< 5.0, >= 4.2.1)" - - GTMSessionFetcher/Core (< 4.0, >= 3.3.2) - - MLImage (= 1.0.0-beta6) - - MLKitCommon (~> 12.0) - - mobile_scanner (6.0.2): + - mobile_scanner (7.0.0): - Flutter - - GoogleMLKit/BarcodeScanning (~> 7.0.0) - - nanopb (3.30910.0): - - nanopb/decode (= 3.30910.0) - - nanopb/encode (= 3.30910.0) - - nanopb/decode (3.30910.0) - - nanopb/encode (3.30910.0) + - FlutterMacOS - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS - printing (1.0.0): - Flutter - - PromisesObjC (2.4.0) - SDWebImage (5.20.0): - SDWebImage/Core (= 5.20.0) - SDWebImage/Core (5.20.0) @@ -131,7 +85,7 @@ DEPENDENCIES: - flutter_tts (from `.symlinks/plugins/flutter_tts/ios`) - geolocator_apple (from `.symlinks/plugins/geolocator_apple/darwin`) - local_auth_darwin (from `.symlinks/plugins/local_auth_darwin/darwin`) - - mobile_scanner (from `.symlinks/plugins/mobile_scanner/ios`) + - mobile_scanner (from `.symlinks/plugins/mobile_scanner/darwin`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - printing (from `.symlinks/plugins/printing/ios`) - share_plus (from `.symlinks/plugins/share_plus/ios`) @@ -144,17 +98,6 @@ SPEC REPOS: trunk: - DKImagePickerController - DKPhotoGallery - - GoogleDataTransport - - GoogleMLKit - - GoogleToolboxForMac - - GoogleUtilities - - GTMSessionFetcher - - MLImage - - MLKitBarcodeScanning - - MLKitCommon - - MLKitVision - - nanopb - - PromisesObjC - SDWebImage - SwiftyGif @@ -178,7 +121,7 @@ EXTERNAL SOURCES: local_auth_darwin: :path: ".symlinks/plugins/local_auth_darwin/darwin" mobile_scanner: - :path: ".symlinks/plugins/mobile_scanner/ios" + :path: ".symlinks/plugins/mobile_scanner/darwin" path_provider_foundation: :path: ".symlinks/plugins/path_provider_foundation/darwin" printing: @@ -205,26 +148,15 @@ SPEC CHECKSUMS: flutter_native_splash: 35ddbc7228eafcb3969dcc5f1fbbe27c1145a4f0 flutter_tts: b88dbc8655d3dc961bc4a796e4e16a4cc1795833 geolocator_apple: ab36aa0e8b7d7a2d7639b3b4e48308394e8cef5e - GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7 - GoogleMLKit: eff9e23ec1d90ea4157a1ee2e32a4f610c5b3318 - GoogleToolboxForMac: d1a2cbf009c453f4d6ded37c105e2f67a32206d8 - GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d - GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6 local_auth_darwin: 553ce4f9b16d3fdfeafce9cf042e7c9f77c1c391 - MLImage: 0ad1c5f50edd027672d8b26b0fee78a8b4a0fc56 - MLKitBarcodeScanning: 0a3064da0a7f49ac24ceb3cb46a5bc67496facd2 - MLKitCommon: 07c2c33ae5640e5380beaaa6e4b9c249a205542d - MLKitVision: 45e79d68845a2de77e2dd4d7f07947f0ed157b0e - mobile_scanner: af8f71879eaba2bbcb4d86c6a462c3c0e7f23036 - nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 + mobile_scanner: 9157936403f5a0644ca3779a38ff8404c5434a93 path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564 printing: 54ff03f28fe9ba3aa93358afb80a8595a071dd07 - PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 SDWebImage: 73c6079366fea25fa4bb9640d5fb58f0893facd8 share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7 SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4 - syncfusion_flutter_pdfviewer: dfb514751af5b6b71e504c9c04a2e4ddbc1dd895 + syncfusion_flutter_pdfviewer: 90dc48305d2e33d4aa20681d1e98ddeda891bc14 url_launcher_ios: 694010445543906933d732453a59da0a173ae33d webview_flutter_wkwebview: 1821ceac936eba6f7984d89a9f3bcb4dea99ebb2 diff --git a/Frontend/ios/Runner.xcodeproj/project.pbxproj b/Frontend/ios/Runner.xcodeproj/project.pbxproj index 338810dc..5bb64111 100644 --- a/Frontend/ios/Runner.xcodeproj/project.pbxproj +++ b/Frontend/ios/Runner.xcodeproj/project.pbxproj @@ -198,7 +198,6 @@ 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, CD2265EBFCCA7833EF5BB6D4 /* [CP] Embed Pods Frameworks */, - 74234597279ED22D9553D74E /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -308,23 +307,6 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; - 74234597279ED22D9553D74E /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; diff --git a/Frontend/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/Frontend/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 15cada48..e3773d42 100644 --- a/Frontend/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/Frontend/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -26,6 +26,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit" shouldUseLaunchSchemeArgsEnv = "YES"> =3.7.0-0 <3.9.0" - flutter: ">=3.27.0" + dart: ">=3.8.0 <3.9.0" + flutter: ">=3.29.0"