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'
22
+ }
23
+
24
+ apply plugin : ' com.android.application'
25
+ apply from : " $flutterRoot /packages/flutter_tools/gradle/flutter.gradle"
26
+
27
+ android {
28
+ compileSdkVersion 28
29
+
30
+ lintOptions {
31
+ disable ' InvalidPackage'
32
+ }
33
+
34
+ defaultConfig {
35
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
36
+ applicationId " com.example.chat_app"
37
+ minSdkVersion 16
38
+ targetSdkVersion 28
39
+ versionCode flutterVersionCode. toInteger()
40
+ versionName flutterVersionName
41
+ testInstrumentationRunner " android.support.test.runner.AndroidJUnitRunner"
42
+ }
43
+
44
+ buildTypes {
45
+ release {
46
+ // TODO: Add your own signing config for the release build.
47
+ // Signing with the debug keys for now, so `flutter run --release` works.
48
+ signingConfig signingConfigs. debug
49
+ }
50
+ }
51
+ }
52
+
53
+ flutter {
54
+ source ' ../..'
55
+ }
56
+
57
+ dependencies {
58
+
59
+ // implementation 'com.google.firebase:firebase-core:16.0.9'
60
+ implementation ' com.google.firebase:firebase-messaging:18.0.0'
61
+ testImplementation ' junit:junit:4.12'
62
+ androidTestImplementation ' com.android.support.test:runner:1.0.2'
63
+ androidTestImplementation ' com.android.support.test.espresso:espresso-core:3.0.2'
64
+ }
65
+
66
+ apply plugin : ' com.google.gms.google-services'
0 commit comments