1+ /* groovylint-disable DuplicateListLiteral, DuplicateNumberLiteral, DuplicateStringLiteral, LineLength, UnnecessaryGString */
12def localProperties = new Properties ()
23def localPropertiesFile = rootProject. file(' local.properties' )
34if (localPropertiesFile. exists()) {
@@ -18,34 +19,23 @@ if (flutterRoot == null) {
1819 throw new GradleException (" Flutter SDK not found. Define location with flutter.sdk in the local.properties file." )
1920}
2021
21- def flutterVersionCode = localProperties. getProperty(' flutter.versionCode' )
22- if (flutterVersionCode == null ) {
23- flutterVersionCode = ' 1'
24- }
25-
26- def flutterVersionName = localProperties. getProperty(' flutter.versionName' )
27- if (flutterVersionName == null ) {
28- flutterVersionName = ' 1.0'
29- }
30-
31- def flutterMinSdkVersion = localProperties. getProperty(' flutter.minSdkVersion' )
32- if (flutterMinSdkVersion == null ) {
33- flutterMinSdkVersion = ' 19'
34- }
22+ def flutterVersionCode = localProperties[' flutter.versionCode' ] ?: ' 1'
23+ def flutterVersionName = localProperties[' flutter.versionName' ] ?: ' 1.0'
24+ def flutterMinSdkVersion = localProperties[' flutter.minSdkVersion' ] ?: ' 19'
3525
3626def isFirebaseDistribution = System . getenv(' IS_FIREBASE_DISTRIBUTION' ) == ' true'
3727
3828apply plugin : ' com.android.application'
39- // START: FlutterFire Configuration
40- apply plugin : ' com.google.gms.google-services'
41- apply plugin : ' com.google.firebase.firebase-perf'
42- apply plugin : ' com.google.firebase.crashlytics'
43- // END: FlutterFire Configuration
4429apply plugin : ' kotlin-android'
30+
31+ apply from : ' load-environment-variables.gradle'
32+ apply from : ' google-services.gradle'
33+ apply from : ' google-ads.gradle'
34+
4535apply from : " $flutterRoot /packages/flutter_tools/gradle/flutter.gradle"
4636
4737android {
48- compileSdkVersion 33
38+ compileSdkVersion flutter . compileSdkVersion
4939
5040 compileOptions {
5141 sourceCompatibility JavaVersion . VERSION_1_8
@@ -64,12 +54,10 @@ android {
6454 applicationId " com.zapfy.app"
6555
6656 minSdkVersion flutterMinSdkVersion. toInteger()
67- targetSdkVersion 33
57+ targetSdkVersion flutter . targetSdkVersion
6858
6959 versionCode flutterVersionCode. toInteger()
7060 versionName flutterVersionName
71-
72- manifestPlaceholders[" ADS_APP_ID" ] = System . getenv(' ANDROID_ADS_APP_ID' ) ?: secretsProperties. getProperty(' ads.appId' )
7361 }
7462
7563 signingConfigs {
@@ -83,9 +71,6 @@ android {
8371
8472 buildTypes {
8573 debug {
86- FirebasePerformance {
87- instrumentationEnabled false
88- }
8974 applicationIdSuffix " .dev"
9075 signingConfig signingConfigs. debug
9176 }
@@ -110,20 +95,6 @@ flutter {
11095 source ' ../..'
11196}
11297
113- project. gradle. taskGraph. whenReady { graph ->
114- project. tasks. findAll(). forEach { task ->
115- if (task. name. contains(" processDebugGoogleServices" )) {
116- def googleServicesJsonFiles = fileTree(dir : " ." , include : " **/google-services.json" )
117- if (googleServicesJsonFiles. isEmpty()) {
118- task. enabled = false
119- }
120- }
121- }
122- }
123-
12498dependencies {
12599 implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version "
126-
127- implementation platform(' com.google.firebase:firebase-bom:30.3.0' )
128- implementation ' com.google.firebase:firebase-analytics'
129100}
0 commit comments