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'
17- }
18-
19- def flutterVersionName = localProperties. getProperty(' flutter.versionName' )
20- if (flutterVersionName == null ) {
21- flutterVersionName = ' 1.0'
1+ plugins {
2+ id " com.android.application"
3+ // START: FlutterFire Configuration
4+ id ' com.google.gms.google-services'
5+ // END: FlutterFire Configuration
6+ id " kotlin-android"
7+ // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
8+ id " dev.flutter.flutter-gradle-plugin"
229}
2310
24- apply plugin : ' com.android.application'
25- apply plugin : ' kotlin-android'
26- apply from : " $flutterRoot /packages/flutter_tools/gradle/flutter.gradle"
27-
2811android {
29- compileSdkVersion 30
12+ namespace = " com.example.ignite_crud_firebase"
13+ compileSdk = flutter. compileSdkVersion
14+ ndkVersion = flutter. ndkVersion
15+
16+ compileOptions {
17+ sourceCompatibility = JavaVersion . VERSION_1_8
18+ targetCompatibility = JavaVersion . VERSION_1_8
19+ }
3020
31- sourceSets {
32- main . java . srcDirs + = ' src/main/kotlin '
21+ kotlinOptions {
22+ jvmTarget = JavaVersion . VERSION_1_8
3323 }
3424
3525 defaultConfig {
3626 // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
37- applicationId " com.rocketseat.crud_firebase"
38- minSdkVersion 23
39- targetSdkVersion 30
40- versionCode flutterVersionCode. toInteger()
41- versionName flutterVersionName
27+ applicationId = " com.example.ignite_crud_firebase"
28+ // You can update the following values to match your application needs.
29+ // For more information, see: https://flutter.dev/to/review-gradle-config.
30+ minSdk = flutter. minSdkVersion
31+ targetSdk = flutter. targetSdkVersion
32+ versionCode = flutter. versionCode
33+ versionName = flutter. versionName
4234 }
4335
4436 buildTypes {
4537 release {
4638 // TODO: Add your own signing config for the release build.
4739 // Signing with the debug keys for now, so `flutter run --release` works.
48- signingConfig signingConfigs. debug
40+ signingConfig = signingConfigs. debug
4941 }
5042 }
5143}
5244
5345flutter {
54- source ' ../..'
46+ source = " ../.."
5547}
56-
57- dependencies {
58- implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version "
59- implementation platform(' com.google.firebase:firebase-bom:28.2.0' )
60- implementation ' com.google.firebase:firebase-analytics'
61- }
62-
63- apply plugin : ' com.google.gms.google-services'
0 commit comments