17
17
buildscript {
18
18
ext {
19
19
firebaseVersion = ' 20.2.0'
20
- kotlinVersion = ' 1.3 .10'
21
- kotlinxCoroutinesVersion = ' 0.22.5 '
20
+ kotlinVersion = ' 1.6 .10'
21
+ kotlinxCoroutinesVersion = ' 1.3.9 '
22
22
kotsonVersion = ' 2.5.0'
23
23
mockWebServerVersion = ' 2.7.5'
24
24
supportVersion = ' 1.0.0-beta01'
@@ -27,46 +27,43 @@ buildscript {
27
27
}
28
28
29
29
repositories {
30
- jcenter()
31
30
google()
32
31
maven { url ' https://plugins.gradle.org/m2/' }
32
+ mavenCentral()
33
33
}
34
34
35
35
dependencies {
36
- classpath ' com.android.tools.build:gradle:3.4.2'
37
- classpath(' com.dicedmelon.gradle:jacoco-android:0.1.4' ) {
38
- // https://github.com/arturdm/jacoco-android-gradle-plugin/issues/42
39
- exclude group : ' org.codehaus.groovy' , module : ' groovy-all'
40
- }
41
- classpath ' org.jacoco:org.jacoco.core:0.8.1'
36
+ classpath ' com.android.tools.build:gradle:7.0.4'
42
37
classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion "
43
- classpath ' com.google.android.gms:strict-version-matcher-plugin:1.2.1'
38
+ classpath ' com.google.android.gms:strict-version-matcher-plugin:1.2.2'
39
+ classpath " org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion "
40
+ classpath " org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinxCoroutinesVersion "
44
41
}
45
42
}
46
43
47
44
allprojects {
48
45
repositories {
49
46
google()
50
- maven { url ' https://maven.google.com' }
51
- jcenter()
47
+ mavenCentral()
48
+ }
49
+ def isLibrary = it. name. startsWith(' library' )
50
+
51
+ if (isLibrary) {
52
+ apply plugin : ' maven-publish'
52
53
}
53
- apply plugin : ' maven-publish'
54
54
}
55
55
56
56
subprojects {
57
57
def isLibrary = it. name. startsWith(' library' )
58
58
59
-
60
59
if (isLibrary) {
61
60
apply plugin : ' com.android.library'
62
- apply plugin : ' jacoco-android'
63
61
} else {
64
62
apply plugin : ' com.android.application'
65
63
}
66
64
apply plugin : ' com.google.android.gms.strict-version-matcher-plugin'
67
65
apply plugin : ' kotlin-android'
68
66
apply plugin : ' kotlin-android-extensions'
69
-
70
67
71
68
if (isLibrary) {
72
69
// workaround for group/version not picked up through project() dependency
@@ -75,18 +72,22 @@ subprojects {
75
72
}
76
73
77
74
android {
78
- compileSdkVersion 28
75
+ compileSdkVersion 31
79
76
buildToolsVersion ' 28.0.3'
80
77
78
+ lintOptions {
79
+ abortOnError false
80
+ }
81
81
82
82
defaultConfig {
83
83
minSdkVersion 16
84
- targetSdkVersion 28
84
+ targetSdkVersion 31
85
85
86
86
versionCode 1
87
87
versionName VERSION_NAME
88
88
89
89
buildConfigField(' String' , logTagName, " \" $logTagValue \" " )
90
+ buildConfigField(' String' , " VERSION_NAME" , " \" $VERSION_NAME \" " )
90
91
91
92
if (isLibrary) {
92
93
archivesBaseName = " ${ POM_ARTIFACT_ID} -${ versionName} .${ System.getenv("BUILD_NUMBER") ?: getSha()} "
@@ -106,12 +107,6 @@ subprojects {
106
107
includeAndroidResources = true
107
108
}
108
109
}
109
-
110
- buildTypes {
111
- debug {
112
- testCoverageEnabled true
113
- }
114
- }
115
110
}
116
111
}
117
112
@@ -121,43 +116,27 @@ subprojects {
121
116
testImplementation ' com.google.truth:truth:0.42'
122
117
testImplementation ' com.nhaarman:mockito-kotlin:1.5.0'
123
118
testImplementation " com.squareup.okhttp:mockwebserver:$mockWebServerVersion "
124
- testImplementation ' junit:junit:4.12 '
119
+ testImplementation ' junit:junit:4.13.2 '
125
120
testImplementation ' nl.jqno.equalsverifier:equalsverifier:2.3.3'
126
121
testImplementation " org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion "
127
122
testImplementation " org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion "
128
123
testImplementation " org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersion "
129
- testImplementation " org.jetbrains.kotlinx:kotlinx-coroutines-core: $k otlinxCoroutinesVersion "
130
- testImplementation ' org.json:json:20171018 '
131
- testImplementation ' org.mockito:mockito-core:2.16.0 '
132
- testImplementation ' org.robolectric:robolectric:4.0 '
124
+ testImplementation ' org.json:json:20180813 '
125
+ testImplementation ' org.mockito:mockito-core:4.2.0 '
126
+ testImplementation ' org.robolectric:robolectric:4.7.3 '
127
+ testImplementation " org.jetbrains.kotlinx:kotlinx-coroutines-test: $k otlinxCoroutinesVersion "
133
128
}
134
129
} else {
135
- dependencies
136
- {
137
- api " androidx.appcompat:appcompat:$supportVersion "
138
- }
139
-
140
- }
141
-
142
- if (isLibrary) {
143
- apply from : " $rootProject . projectDir /gradle/mvn-push.gradle"
130
+ dependencies {
131
+ api " androidx.appcompat:appcompat:$supportVersion "
132
+ }
144
133
}
145
134
}
146
135
147
- wrapper {
148
- gradleVersion = ' 4.4'
149
- }
150
-
151
136
task clean (type : Delete ) {
152
137
delete rootProject. buildDir
153
138
}
154
139
155
- tasks. whenTaskAdded { task ->
156
- if (task. name. contains(" Test" ) || task. name. contains(" test" )) {
157
- task. enabled = false
158
- }
159
- }
160
-
161
140
static def getSha () {
162
141
return ' git rev-parse --short HEAD' . execute(). text. trim()
163
142
}
0 commit comments