1
1
plugins {
2
2
id ' com.android.application'
3
3
id ' kotlin-android'
4
+ id ' com.google.gms.google-services'
5
+ id ' com.google.firebase.crashlytics'
4
6
}
5
7
6
8
android {
7
- compileSdkVersion 33
8
-
9
+ compileSdk 34
9
10
defaultConfig {
10
11
applicationId " com.tananaev.logcat"
11
12
minSdkVersion 19
12
- targetSdkVersion 33
13
- versionCode 14
14
- versionName " 2.0 "
13
+ targetSdkVersion 34
14
+ versionCode 15
15
+ versionName " 2.1 "
15
16
multiDexEnabled true
16
17
}
17
18
namespace " com.tananaev.logcat"
18
19
19
- flavorDimensions ' default'
20
+ buildFeatures {
21
+ flavorDimensions = [' default' ]
22
+ }
20
23
productFlavors {
21
24
regular {
22
25
isDefault = true
26
+ ext. enableCrashlytics = false
23
27
}
24
28
google
25
29
}
30
+
31
+ compileOptions {
32
+ sourceCompatibility = JavaVersion . VERSION_17
33
+ targetCompatibility = JavaVersion . VERSION_17
34
+ }
35
+
36
+ kotlinOptions {
37
+ jvmTarget = JavaVersion . VERSION_17 . toString()
38
+ }
39
+
26
40
lint {
27
41
checkReleaseBuilds false
28
42
}
@@ -31,28 +45,28 @@ android {
31
45
dependencies {
32
46
implementation " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
33
47
implementation ' com.android.support:multidex:2.0.1'
34
- implementation ' com.google.android.material:material:1.7 .0'
35
- implementation ' androidx.core:core-ktx:1.9 .0'
48
+ implementation ' com.google.android.material:material:1.10 .0'
49
+ implementation ' androidx.core:core-ktx:1.12 .0'
36
50
implementation ' com.tananaev:adblib:1.2'
37
51
googleImplementation platform(' com.google.firebase:firebase-bom:31.0.1' )
38
52
googleImplementation ' com.google.firebase:firebase-analytics-ktx'
39
53
googleImplementation ' com.google.firebase:firebase-crashlytics'
40
- googleImplementation ' com.google.android.gms:play-services-ads:21.4 .0'
54
+ googleImplementation ' com.google.android.gms:play-services-ads:22.5 .0'
41
55
googleImplementation ' com.google.android.play:review-ktx:2.0.1'
42
56
}
43
57
44
- if (getGradle() . getStartParameter() . getTaskRequests() . toString() . contains( ' Google ' ) ) {
45
- apply plugin : ' com.google.gms.google-services '
46
- apply plugin : ' com.google.firebase.crashlytics '
47
-
48
- task copyJson( type : Copy ) {
49
- from ' ../../environment/firebase '
50
- into ' . '
51
- include ' rootless-logcat.json '
52
- rename( ' rootless-logcat.json ' , ' google-services.json ' )
53
- }
54
-
55
- afterEvaluate {
56
- preBuild . dependsOn copyJson
58
+ tasks . register( ' copyFirebaseConfig ' , Copy ) {
59
+ from ' ../../environment/firebase '
60
+ into ' . '
61
+ include ' rootless-logcat.json '
62
+ rename( ' rootless-logcat.json ' , ' google-services.json ' )
63
+ }
64
+ afterEvaluate {
65
+ tasks . matching { it . name . contains( ' Google ' ) } . configureEach { task ->
66
+ if (task . name . contains( ' Regular ' )) {
67
+ task . enabled false
68
+ } else {
69
+ task . dependsOn copyFirebaseConfig
70
+ }
57
71
}
58
72
}
0 commit comments