1- def localProperties = new Properties ()
2- def localPropertiesFile = rootProject. file(' local.properties' )
3- if (localPropertiesFile. exists()) {
4- localPropertiesFile. withReader(' UTF-8' ) { reader ->
5- localProperties. load(reader)
6- }
7- }
8-
9- def flutterRoot = localProperties. getProperty(' flutter.sdk' )
10- if (flutterRoot == null ) {
11- throw new GradleException (" Flutter SDK not found. Define location with flutter.sdk in the local.properties file." )
12- }
13-
14- def flutterVersionCode = localProperties. getProperty(' flutter.versionCode' )
15- if (flutterVersionCode == null ) {
16- flutterVersionCode = ' 1'
1+ plugins {
2+ id " com.android.application"
3+ id " kotlin-android"
4+ // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5+ id " dev.flutter.flutter-gradle-plugin"
176}
187
19- def flutterVersionName = localProperties. getProperty(' flutter.versionName' )
20- if (flutterVersionName == null ) {
21- flutterVersionName = ' 1.0'
22- }
23-
24- apply plugin : ' com.android.application'
25- apply plugin : ' com.google.gms.google-services'
26- apply plugin : ' kotlin-android'
27- apply from : " $flutterRoot /packages/flutter_tools/gradle/flutter.gradle"
28-
298android {
30- compileSdkVersion flutter. compileSdkVersion
9+ namespace = " com.example.phone_auth_handler_demo"
10+ compileSdk = flutter. compileSdkVersion
11+ ndkVersion = flutter. ndkVersion
3112
3213 compileOptions {
33- sourceCompatibility JavaVersion . VERSION_1_8
34- targetCompatibility JavaVersion . VERSION_1_8
14+ sourceCompatibility = JavaVersion . VERSION_1_8
15+ targetCompatibility = JavaVersion . VERSION_1_8
3516 }
3617
3718 kotlinOptions {
38- jvmTarget = ' 1.8'
39- }
40-
41- sourceSets {
42- main. java. srcDirs + = ' src/main/kotlin'
19+ jvmTarget = JavaVersion . VERSION_1_8
4320 }
4421
4522 defaultConfig {
4623 // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
47- applicationId " com.example.phone_auth_handler_demo"
48- minSdkVersion flutter. minSdkVersion
49- targetSdkVersion flutter. targetSdkVersion
50- versionCode flutterVersionCode. toInteger()
51- versionName flutterVersionName
24+ applicationId = " com.example.phone_auth_handler_demo"
25+ // You can update the following values to match your application needs.
26+ // For more information, see: https://flutter.dev/to/review-gradle-config.
27+ minSdk = 23
28+ targetSdk = flutter. targetSdkVersion
29+ versionCode = flutter. versionCode
30+ versionName = flutter. versionName
5231 }
5332
5433 buildTypes {
5534 release {
5635 // TODO: Add your own signing config for the release build.
5736 // Signing with the debug keys for now, so `flutter run --release` works.
58- signingConfig signingConfigs. debug
37+ signingConfig = signingConfigs. debug
5938 }
6039 }
6140}
6241
42+ flutter {
43+ source = " ../.."
44+ }
45+
6346dependencies {
6447 // Import the Firebase BoM
6548 implementation platform(' com.google.firebase:firebase-bom:29.3.1' )
6649
6750
6851 // Add the dependencies for the desired Firebase products
6952 // https://firebase.google.com/docs/android/setup#available-libraries
70- }
71-
72- flutter {
73- source ' ../..'
74- }
75-
76- dependencies {
77- implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version "
78- }
53+ }
0 commit comments