diff --git a/android/app/build.gradle b/android/app/build.gradle index 032843a..8e565d4 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -28,8 +28,10 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { compileSdkVersion 34 + namespace = "com.cloud.solutions.mowater.ksa.provider" compileOptions { + coreLibraryDesugaringEnabled true sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } @@ -49,6 +51,8 @@ android { targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName + multiDexEnabled true + } buildTypes { @@ -67,5 +71,7 @@ flutter { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation platform('com.google.firebase:firebase-bom:33.1.2') + coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2' + // implementation 'com.google.firebase:firebase-analytics' } diff --git a/android/build.gradle b/android/build.gradle index 14c9783..fb05872 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,3 +1,36 @@ +//buildscript { +// ext.kotlin_version = '1.8.0' +// repositories { +// google() +// mavenCentral() +// } +// +// dependencies { +// classpath 'com.android.tools.build:gradle:7.3.0' +// classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" +// classpath 'com.google.gms:google-services:4.4.2' +// } +//} +// +// +//allprojects { +// repositories { +// google() +// mavenCentral() +// } +//} +// +//rootProject.buildDir = '../build' +//subprojects { +// project.buildDir = "${rootProject.buildDir}/${project.name}" +// project.evaluationDependsOn(':app') +//} +// +//tasks.register("clean", Delete) { +// delete rootProject.buildDir +//} + + buildscript { ext.kotlin_version = '1.8.0' repositories { @@ -6,7 +39,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.3.0' + classpath 'com.android.tools.build:gradle:8.7.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.gms:google-services:4.4.2' } @@ -18,6 +51,18 @@ allprojects { google() mavenCentral() } + subprojects { + afterEvaluate { project -> + if (project.hasProperty('android')) { + project.android { + if (namespace == null) { + namespace project.group + } + } + } + } + } + } rootProject.buildDir = '../build' diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 41dfb87..6dfc156 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Mon Nov 04 14:28:07 AST 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/android/settings.gradle b/android/settings.gradle index 44e62bc..f86bddf 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,11 +1,26 @@ -include ':app' +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version '8.7.0' apply false + id "org.jetbrains.kotlin.android" version "1.8.22" apply false + +} + +include ":app" \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index 77cb1f7..c184032 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -163,7 +163,7 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { - return Sizer( + return ResponsiveSizer( builder: (context, orientation, deviceType) { injector.get().setAppType(AppType.provider); diff --git a/pubspec.yaml b/pubspec.yaml index ee58bea..6f1693f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -40,7 +40,7 @@ dependencies: # path: C:/Users/mirza.shafique/AndroidStudioProjects/mc_common_app mc_common_app: - path: /Volumes/Data/Projects/Flutter/car_common_app + path: D:\Development\car_common_app # path: /Users/amir/StudioProjects/car_common_app