1717buildscript {
1818 ext {
1919 firebaseVersion = ' 20.2.0'
20- kotlinVersion = ' 1.3 .10'
21- kotlinxCoroutinesVersion = ' 0.22.5 '
20+ kotlinVersion = ' 1.6 .10'
21+ kotlinxCoroutinesVersion = ' 1.3.9 '
2222 kotsonVersion = ' 2.5.0'
2323 mockWebServerVersion = ' 2.7.5'
2424 supportVersion = ' 1.0.0-beta01'
@@ -27,46 +27,43 @@ buildscript {
2727 }
2828
2929 repositories {
30- jcenter()
3130 google()
3231 maven { url ' https://plugins.gradle.org/m2/' }
32+ mavenCentral()
3333 }
3434
3535 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'
4237 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 "
4441 }
4542}
4643
4744allprojects {
4845 repositories {
4946 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'
5253 }
53- apply plugin : ' maven-publish'
5454}
5555
5656subprojects {
5757 def isLibrary = it. name. startsWith(' library' )
5858
59-
6059 if (isLibrary) {
6160 apply plugin : ' com.android.library'
62- apply plugin : ' jacoco-android'
6361 } else {
6462 apply plugin : ' com.android.application'
6563 }
6664 apply plugin : ' com.google.android.gms.strict-version-matcher-plugin'
6765 apply plugin : ' kotlin-android'
6866 apply plugin : ' kotlin-android-extensions'
69-
7067
7168 if (isLibrary) {
7269 // workaround for group/version not picked up through project() dependency
@@ -75,18 +72,22 @@ subprojects {
7572 }
7673
7774 android {
78- compileSdkVersion 28
75+ compileSdkVersion 31
7976 buildToolsVersion ' 28.0.3'
8077
78+ lintOptions {
79+ abortOnError false
80+ }
8181
8282 defaultConfig {
8383 minSdkVersion 16
84- targetSdkVersion 28
84+ targetSdkVersion 31
8585
8686 versionCode 1
8787 versionName VERSION_NAME
8888
8989 buildConfigField(' String' , logTagName, " \" $logTagValue \" " )
90+ buildConfigField(' String' , " VERSION_NAME" , " \" $VERSION_NAME \" " )
9091
9192 if (isLibrary) {
9293 archivesBaseName = " ${ POM_ARTIFACT_ID} -${ versionName} .${ System.getenv("BUILD_NUMBER") ?: getSha()} "
@@ -106,12 +107,6 @@ subprojects {
106107 includeAndroidResources = true
107108 }
108109 }
109-
110- buildTypes {
111- debug {
112- testCoverageEnabled true
113- }
114- }
115110 }
116111 }
117112
@@ -121,43 +116,27 @@ subprojects {
121116 testImplementation ' com.google.truth:truth:0.42'
122117 testImplementation ' com.nhaarman:mockito-kotlin:1.5.0'
123118 testImplementation " com.squareup.okhttp:mockwebserver:$mockWebServerVersion "
124- testImplementation ' junit:junit:4.12 '
119+ testImplementation ' junit:junit:4.13.2 '
125120 testImplementation ' nl.jqno.equalsverifier:equalsverifier:2.3.3'
126121 testImplementation " org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion "
127122 testImplementation " org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion "
128123 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 "
133128 }
134129 } 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+ }
144133 }
145134}
146135
147- wrapper {
148- gradleVersion = ' 4.4'
149- }
150-
151136task clean (type : Delete ) {
152137 delete rootProject. buildDir
153138}
154139
155- tasks. whenTaskAdded { task ->
156- if (task. name. contains(" Test" ) || task. name. contains(" test" )) {
157- task. enabled = false
158- }
159- }
160-
161140static def getSha () {
162141 return ' git rev-parse --short HEAD' . execute(). text. trim()
163142}
0 commit comments