Skip to content

Commit 04d2bf3

Browse files
TarekkMALyokone
andauthored
chore(core): upgrade example gradle (#12883)
* chore(core): upgrade example gradle * update --------- Co-authored-by: Guillaume Bernos <[email protected]>
1 parent 12e87de commit 04d2bf3

File tree

15 files changed

+747
-65
lines changed

15 files changed

+747
-65
lines changed

packages/firebase_core/firebase_core/example/android/.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
9+
# Remember to never publicly share your keystore.
10+
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
key.properties
12+
**/*.keystore
13+
**/*.jks
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,60 @@
11
plugins {
22
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.
38
id "dev.flutter.flutter-gradle-plugin"
49
}
510

611
def localProperties = new Properties()
7-
def localPropertiesFile = rootProject.file('local.properties')
12+
def localPropertiesFile = rootProject.file("local.properties")
813
if (localPropertiesFile.exists()) {
9-
localPropertiesFile.withReader('UTF-8') { reader ->
10-
localProperties.load(reader)
11-
}
14+
localPropertiesFile.withReader("UTF-8") { reader ->
15+
localProperties.load(reader)
16+
}
1217
}
1318

14-
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
19+
def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
1520
if (flutterVersionCode == null) {
16-
flutterVersionCode = '1'
21+
flutterVersionCode = "1"
1722
}
1823

19-
def flutterVersionName = localProperties.getProperty('flutter.versionName')
24+
def flutterVersionName = localProperties.getProperty("flutter.versionName")
2025
if (flutterVersionName == null) {
21-
flutterVersionName = '1.0'
26+
flutterVersionName = "1.0"
2227
}
2328

2429
android {
25-
namespace 'io.flutter.plugins.firebasecoreexample'
26-
27-
compileSdk flutter.compileSdkVersion
28-
29-
defaultConfig {
30-
applicationId "io.flutter.plugins.firebasecoreexample"
31-
minSdkVersion flutter.minSdkVersion
32-
targetSdk flutter.targetSdkVersion
33-
versionCode flutterVersionCode.toInteger()
34-
versionName flutterVersionName
35-
}
36-
37-
compileOptions {
38-
sourceCompatibility JavaVersion.VERSION_1_8
39-
targetCompatibility JavaVersion.VERSION_1_8
40-
}
41-
42-
buildFeatures {
43-
buildConfig = true
44-
}
45-
46-
buildTypes {
47-
release {
48-
signingConfig signingConfigs.debug
30+
namespace = "io.flutter.plugins.firebasecoreexample"
31+
compileSdk = flutter.compileSdkVersion
32+
ndkVersion = flutter.ndkVersion
33+
34+
compileOptions {
35+
sourceCompatibility = JavaVersion.VERSION_1_8
36+
targetCompatibility = JavaVersion.VERSION_1_8
37+
}
38+
39+
defaultConfig {
40+
applicationId = "io.flutter.plugins.firebasecoreexample"
41+
// You can update the following values to match your application needs.
42+
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
43+
minSdk = flutter.minSdkVersion
44+
targetSdk = flutter.targetSdkVersion
45+
versionCode = flutterVersionCode.toInteger()
46+
versionName = flutterVersionName
47+
}
48+
49+
buildTypes {
50+
release {
51+
// TODO: Add your own signing config for the release build.
52+
// Signing with the debug keys for now, so `flutter run --release` works.
53+
signingConfig = signingConfigs.debug
54+
}
4955
}
50-
}
5156
}
5257

5358
flutter {
54-
source '../..'
59+
source = "../.."
5560
}

0 commit comments

Comments
 (0)