|
@@ -10,6 +10,7 @@ import org.gradle.internal.jvm.Jvm
|
|
|
|
|
|
buildscript {
|
|
buildscript {
|
|
ext.kotlin_version = '1.5.31'
|
|
ext.kotlin_version = '1.5.31'
|
|
|
|
+ ext.jacoco_version = '0.8.7'
|
|
repositories {
|
|
repositories {
|
|
google()
|
|
google()
|
|
maven {
|
|
maven {
|
|
@@ -18,13 +19,16 @@ buildscript {
|
|
mavenCentral()
|
|
mavenCentral()
|
|
}
|
|
}
|
|
dependencies {
|
|
dependencies {
|
|
- classpath 'com.android.tools.build:gradle:4.2.2'
|
|
|
|
|
|
+ classpath 'com.android.tools.build:gradle:7.0.2'
|
|
classpath 'com.hiya:jacoco-android:0.2'
|
|
classpath 'com.hiya:jacoco-android:0.2'
|
|
classpath 'gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.7.5'
|
|
classpath 'gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.7.5'
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.18.1"
|
|
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.18.1"
|
|
classpath "commons-httpclient:commons-httpclient:3.1@jar" // remove after entire switch to lib v2
|
|
classpath "commons-httpclient:commons-httpclient:3.1@jar" // remove after entire switch to lib v2
|
|
classpath 'com.karumi:shot:5.11.2'
|
|
classpath 'com.karumi:shot:5.11.2'
|
|
|
|
+ classpath "org.jacoco:org.jacoco.core:$jacoco_version"
|
|
|
|
+ classpath "org.jacoco:org.jacoco.report:$jacoco_version"
|
|
|
|
+ classpath "org.jacoco:org.jacoco.agent:$jacoco_version"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -70,9 +74,6 @@ ext {
|
|
fidoVersion = "4.1.0"
|
|
fidoVersion = "4.1.0"
|
|
|
|
|
|
ciBuild = System.getenv("CI") == "true"
|
|
ciBuild = System.getenv("CI") == "true"
|
|
-
|
|
|
|
- // allows for -D pre-dex=false to be set
|
|
|
|
- preDexEnabled = "true" == System.getProperty("pre-dex", "true")
|
|
|
|
}
|
|
}
|
|
|
|
|
|
repositories {
|
|
repositories {
|
|
@@ -100,8 +101,6 @@ for (TaskExecutionRequest tr : getGradle().getStartParameter().getTaskRequests()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
android {
|
|
android {
|
|
lintOptions {
|
|
lintOptions {
|
|
checkGeneratedSources = true
|
|
checkGeneratedSources = true
|
|
@@ -118,10 +117,6 @@ android {
|
|
'InvalidPeriodicWorkRequestInterval' // crashes due to a bug in lint itself
|
|
'InvalidPeriodicWorkRequestInterval' // crashes due to a bug in lint itself
|
|
}
|
|
}
|
|
|
|
|
|
- dexOptions {
|
|
|
|
- javaMaxHeapSize "4g"
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
compileSdkVersion 29
|
|
compileSdkVersion 29
|
|
|
|
|
|
defaultConfig {
|
|
defaultConfig {
|
|
@@ -194,11 +189,6 @@ android {
|
|
// adapt structure from Eclipse to Gradle/Android Studio expectations;
|
|
// adapt structure from Eclipse to Gradle/Android Studio expectations;
|
|
// see http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Configuring-the-Structure
|
|
// see http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Configuring-the-Structure
|
|
|
|
|
|
- dexOptions {
|
|
|
|
- // Skip pre-dexing when running on CI or when disabled via -D pre-dex=false.
|
|
|
|
- preDexLibraries = preDexEnabled && !ciBuild
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
packagingOptions {
|
|
packagingOptions {
|
|
exclude 'META-INF/LICENSE.txt'
|
|
exclude 'META-INF/LICENSE.txt'
|
|
exclude 'META-INF/LICENSE'
|
|
exclude 'META-INF/LICENSE'
|
|
@@ -393,6 +383,11 @@ configurations.all {
|
|
resolutionStrategy{
|
|
resolutionStrategy{
|
|
cacheChangingModulesFor 0, 'seconds'
|
|
cacheChangingModulesFor 0, 'seconds'
|
|
force 'org.objenesis:objenesis:2.6'
|
|
force 'org.objenesis:objenesis:2.6'
|
|
|
|
+ eachDependency { details ->
|
|
|
|
+ if ('org.jacoco' == details.requested.group) {
|
|
|
|
+ details.useVersion "$jacoco_version"
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -412,6 +407,8 @@ android.applicationVariants.all { variant ->
|
|
|
|
|
|
tasks.register("combinedTestReport", JacocoReport) {
|
|
tasks.register("combinedTestReport", JacocoReport) {
|
|
|
|
|
|
|
|
+ jacocoClasspath = configurations['jacocoAnt']
|
|
|
|
+
|
|
reports {
|
|
reports {
|
|
xml.enabled true
|
|
xml.enabled true
|
|
html.enabled true
|
|
html.enabled true
|
|
@@ -463,5 +460,5 @@ shot {
|
|
}
|
|
}
|
|
|
|
|
|
jacoco {
|
|
jacoco {
|
|
- toolVersion = "0.8.7"
|
|
|
|
|
|
+ toolVersion = "$jacoco_version"
|
|
}
|
|
}
|