2020-06-19 12:05:47 +03:00
|
|
|
import com.github.spotbugs.snom.SpotBugsTask
|
2021-05-14 16:27:44 +03:00
|
|
|
import org.gradle.internal.jvm.Jvm
|
2020-06-19 12:05:47 +03:00
|
|
|
|
2016-05-04 15:33:43 +03:00
|
|
|
// Gradle build file
|
|
|
|
//
|
|
|
|
// This project was started in Eclipse and later moved to Android Studio. In the transition, both IDEs were supported.
|
|
|
|
// Due to this, the files layout is not the usual in new projects created with Android Studio / gradle. This file
|
|
|
|
// merges declarations usually split in two separates build.gradle file, one for global settings of the project in
|
|
|
|
// its root folder, another one for the app module in subfolder of root.
|
|
|
|
|
2014-10-03 14:33:41 +04:00
|
|
|
buildscript {
|
2021-09-29 14:02:27 +03:00
|
|
|
ext.kotlin_version = '1.5.31'
|
2021-10-06 13:35:51 +03:00
|
|
|
ext.jacoco_version = '0.8.7'
|
2014-10-03 14:33:41 +04:00
|
|
|
repositories {
|
2018-10-24 09:44:44 +03:00
|
|
|
google()
|
2019-03-31 01:50:50 +03:00
|
|
|
maven {
|
|
|
|
url 'https://plugins.gradle.org/m2/'
|
|
|
|
}
|
2018-08-22 18:42:15 +03:00
|
|
|
mavenCentral()
|
2014-10-03 14:33:41 +04:00
|
|
|
}
|
|
|
|
dependencies {
|
2021-10-12 04:04:40 +03:00
|
|
|
classpath 'com.android.tools.build:gradle:7.0.3'
|
2021-05-13 08:32:15 +03:00
|
|
|
classpath 'com.hiya:jacoco-android:0.2'
|
2021-09-13 04:16:53 +03:00
|
|
|
classpath 'gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.7.5'
|
2019-05-06 14:50:28 +03:00
|
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
2021-08-31 04:05:10 +03:00
|
|
|
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.18.1"
|
2019-11-29 12:12:13 +03:00
|
|
|
classpath "commons-httpclient:commons-httpclient:3.1@jar" // remove after entire switch to lib v2
|
2021-08-06 04:04:12 +03:00
|
|
|
classpath 'com.karumi:shot:5.11.2'
|
2021-10-06 13:35:51 +03:00
|
|
|
classpath "org.jacoco:org.jacoco.core:$jacoco_version"
|
|
|
|
classpath "org.jacoco:org.jacoco.report:$jacoco_version"
|
|
|
|
classpath "org.jacoco:org.jacoco.agent:$jacoco_version"
|
2014-10-03 14:33:41 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: 'com.android.application'
|
2019-05-19 13:07:39 +03:00
|
|
|
|
2019-05-06 14:50:28 +03:00
|
|
|
apply plugin: 'kotlin-android'
|
2019-05-19 13:07:39 +03:00
|
|
|
apply plugin: 'kotlin-kapt'
|
2016-10-09 02:33:12 +03:00
|
|
|
apply plugin: 'checkstyle'
|
|
|
|
apply plugin: 'pmd'
|
2020-06-09 10:53:52 +03:00
|
|
|
apply plugin: 'com.hiya.jacoco-android'
|
2019-12-10 17:26:31 +03:00
|
|
|
apply plugin: 'com.github.spotbugs'
|
|
|
|
apply plugin: 'io.gitlab.arturbosch.detekt'
|
|
|
|
apply plugin: 'shot'
|
2014-10-03 14:33:41 +04:00
|
|
|
|
2021-05-14 16:27:44 +03:00
|
|
|
println "Gradle uses Java ${Jvm.current()}"
|
|
|
|
|
2019-05-23 12:58:59 +03:00
|
|
|
configurations {
|
|
|
|
ktlint
|
2019-02-17 15:29:27 +03:00
|
|
|
|
2019-05-23 12:58:59 +03:00
|
|
|
all {
|
2020-06-19 12:05:47 +03:00
|
|
|
exclude group: 'org.jetbrains', module: 'annotations-java5' // via prism4j, already using annotations explicitly
|
2019-05-23 12:58:59 +03:00
|
|
|
|
|
|
|
// check for updates every build
|
2020-12-17 20:39:05 +03:00
|
|
|
resolutionStrategy {
|
|
|
|
cacheChangingModulesFor 0, 'seconds'
|
|
|
|
exclude group: "org.jetbrains.kotlinx", module: "kotlinx-coroutines-debug"
|
|
|
|
}
|
2019-05-23 12:58:59 +03:00
|
|
|
}
|
2017-03-06 16:16:31 +03:00
|
|
|
}
|
|
|
|
|
2016-04-27 15:48:05 +03:00
|
|
|
ext {
|
2021-07-18 00:56:42 +03:00
|
|
|
androidxTestVersion = "1.4.0"
|
2021-10-04 04:33:06 +03:00
|
|
|
daggerVersion = "2.39.1"
|
2021-02-09 05:04:50 +03:00
|
|
|
markwonVersion = "4.6.2"
|
2019-10-17 19:47:50 +03:00
|
|
|
prismVersion = "2.0.0"
|
2021-09-29 16:29:30 +03:00
|
|
|
androidLibraryVersion = "master-SNAPSHOT"
|
2021-09-06 14:22:15 +03:00
|
|
|
mockitoVersion = "3.12.4"
|
2021-01-06 10:32:53 +03:00
|
|
|
mockkVersion = "1.10.4"
|
2020-11-02 19:35:16 +03:00
|
|
|
powermockVersion = "2.0.9"
|
2021-11-01 05:06:11 +03:00
|
|
|
byteBuddyVersion = "1.11.22"
|
2021-07-16 12:02:25 +03:00
|
|
|
espressoVersion = "3.4.0"
|
2021-01-28 05:04:16 +03:00
|
|
|
workRuntime = "2.5.0"
|
2021-09-03 12:23:47 +03:00
|
|
|
fidoVersion = "4.1.0"
|
2016-08-16 18:22:22 +03:00
|
|
|
|
2020-12-17 20:39:05 +03:00
|
|
|
ciBuild = System.getenv("CI") == "true"
|
2016-04-27 15:48:05 +03:00
|
|
|
}
|
2014-10-03 14:33:41 +04:00
|
|
|
|
|
|
|
repositories {
|
2018-10-24 09:44:44 +03:00
|
|
|
google()
|
2016-06-07 15:02:36 +03:00
|
|
|
maven { url "https://jitpack.io" }
|
2021-05-25 09:40:41 +03:00
|
|
|
mavenCentral()
|
|
|
|
maven {
|
|
|
|
url 'https://plugins.gradle.org/m2/'
|
2014-10-03 14:33:41 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-02-12 14:38:38 +03:00
|
|
|
// semantic versioning for version code
|
|
|
|
def versionMajor = 3
|
2021-10-25 17:17:42 +03:00
|
|
|
def versionMinor = 19
|
2018-02-12 14:38:38 +03:00
|
|
|
def versionPatch = 0
|
2018-11-29 13:13:04 +03:00
|
|
|
def versionBuild = 0 // 0-50=Alpha / 51-98=RC / 90-99=stable
|
2018-02-12 14:38:38 +03:00
|
|
|
|
2019-10-02 11:12:23 +03:00
|
|
|
for (TaskExecutionRequest tr : getGradle().getStartParameter().getTaskRequests()) {
|
|
|
|
for (String arg : tr.args) {
|
|
|
|
// any gplay, but only exact "build", as e.g. buildGeneric shall not apply gplay.grade
|
2020-04-28 18:39:39 +03:00
|
|
|
if (arg.contains("Gplay") || arg.contains("lint") || arg.contains("ExecuteScreenshot") || arg == "build") {
|
2019-10-02 11:12:23 +03:00
|
|
|
apply from: 'gplay.gradle'
|
|
|
|
System.console().println("Applying gplay.gradle")
|
2020-11-10 09:50:59 +03:00
|
|
|
}
|
2019-10-02 11:12:23 +03:00
|
|
|
}
|
2018-07-13 15:03:09 +03:00
|
|
|
}
|
|
|
|
|
2014-10-03 14:33:41 +04:00
|
|
|
android {
|
2016-10-09 02:33:12 +03:00
|
|
|
lintOptions {
|
2020-06-10 09:20:55 +03:00
|
|
|
checkGeneratedSources = true
|
2017-05-13 09:52:56 +03:00
|
|
|
abortOnError false
|
2016-10-09 02:33:12 +03:00
|
|
|
htmlReport true
|
|
|
|
htmlOutput file("$project.buildDir/reports/lint/lint.html")
|
2019-11-25 17:26:08 +03:00
|
|
|
disable 'MissingTranslation',
|
|
|
|
'GradleDependency',
|
|
|
|
'VectorPath',
|
|
|
|
'IconMissingDensityFolder',
|
|
|
|
'IconDensities',
|
2019-12-04 12:57:47 +03:00
|
|
|
'GoogleAppIndexingWarning',
|
2020-05-01 02:27:57 +03:00
|
|
|
'MissingDefaultResource',
|
|
|
|
'InvalidPeriodicWorkRequestInterval' // crashes due to a bug in lint itself
|
2016-10-09 02:33:12 +03:00
|
|
|
}
|
2017-02-22 02:46:47 +03:00
|
|
|
|
2019-10-11 08:16:01 +03:00
|
|
|
compileSdkVersion 29
|
2015-11-28 13:26:58 +03:00
|
|
|
|
2016-05-05 09:46:47 +03:00
|
|
|
defaultConfig {
|
2021-10-25 16:35:52 +03:00
|
|
|
minSdkVersion 23
|
2019-10-11 08:16:01 +03:00
|
|
|
targetSdkVersion 29
|
2017-12-21 11:47:10 +03:00
|
|
|
|
2016-05-09 15:06:44 +03:00
|
|
|
// arguments to be passed to functional tests
|
2019-12-10 17:26:31 +03:00
|
|
|
testInstrumentationRunner "com.nextcloud.client.ScreenshotTestRunner"
|
2019-02-21 02:15:12 +03:00
|
|
|
testInstrumentationRunnerArgument "TEST_SERVER_URL", "${NC_TEST_SERVER_BASEURL}"
|
|
|
|
testInstrumentationRunnerArgument "TEST_SERVER_USERNAME", "${NC_TEST_SERVER_USERNAME}"
|
|
|
|
testInstrumentationRunnerArgument "TEST_SERVER_PASSWORD", "${NC_TEST_SERVER_PASSWORD}"
|
2019-12-11 12:17:15 +03:00
|
|
|
testInstrumentationRunnerArguments disableAnalytics: 'true'
|
2016-06-07 22:58:37 +03:00
|
|
|
|
2017-02-22 02:40:03 +03:00
|
|
|
multiDexEnabled true
|
2016-05-05 09:46:47 +03:00
|
|
|
|
2018-03-20 14:53:56 +03:00
|
|
|
versionCode versionMajor * 10000000 + versionMinor * 10000 + versionPatch * 100 + versionBuild
|
2018-02-12 18:10:41 +03:00
|
|
|
|
2018-11-29 13:13:04 +03:00
|
|
|
if (versionBuild > 89) {
|
2018-02-12 18:10:41 +03:00
|
|
|
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
|
2018-09-19 08:46:50 +03:00
|
|
|
} else if (versionBuild > 50) {
|
2018-07-11 15:57:02 +03:00
|
|
|
versionName "${versionMajor}.${versionMinor}.${versionPatch} RC" + (versionBuild - 50)
|
2018-02-12 18:10:41 +03:00
|
|
|
} else {
|
2018-07-11 15:57:02 +03:00
|
|
|
versionName "${versionMajor}.${versionMinor}.${versionPatch} Alpha" + (versionBuild + 1)
|
2018-02-12 18:10:41 +03:00
|
|
|
}
|
2017-10-06 11:41:15 +03:00
|
|
|
|
2017-03-05 23:09:36 +03:00
|
|
|
// 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
|
2014-10-03 14:33:41 +04:00
|
|
|
|
2017-06-07 10:42:41 +03:00
|
|
|
flavorDimensions "default"
|
|
|
|
|
2018-03-02 14:08:09 +03:00
|
|
|
buildTypes {
|
|
|
|
debug {
|
2020-01-21 11:44:42 +03:00
|
|
|
testCoverageEnabled (project.hasProperty('coverage'))
|
2018-03-02 14:08:09 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-05 23:09:36 +03:00
|
|
|
productFlavors {
|
2017-04-26 22:11:27 +03:00
|
|
|
// used for f-droid
|
2017-02-24 17:22:02 +03:00
|
|
|
generic {
|
2017-02-23 17:11:56 +03:00
|
|
|
applicationId 'com.nextcloud.client'
|
2017-06-07 10:42:41 +03:00
|
|
|
dimension "default"
|
2017-02-23 17:11:56 +03:00
|
|
|
}
|
2016-08-15 15:01:00 +03:00
|
|
|
|
2017-04-28 10:26:16 +03:00
|
|
|
gplay {
|
|
|
|
applicationId 'com.nextcloud.client'
|
2017-06-07 10:42:41 +03:00
|
|
|
dimension "default"
|
2017-04-28 10:26:16 +03:00
|
|
|
}
|
|
|
|
|
2017-04-13 10:14:19 +03:00
|
|
|
versionDev {
|
|
|
|
applicationId "com.nextcloud.android.beta"
|
|
|
|
dimension "default"
|
2020-01-29 05:38:37 +03:00
|
|
|
versionCode 20200129
|
|
|
|
versionName "20200129"
|
2017-04-13 10:14:19 +03:00
|
|
|
}
|
2019-05-15 09:59:06 +03:00
|
|
|
|
|
|
|
qa {
|
|
|
|
applicationId "com.nextcloud.android.qa"
|
|
|
|
dimension "default"
|
|
|
|
versionCode 1
|
|
|
|
versionName "1"
|
|
|
|
}
|
2017-02-23 17:11:56 +03:00
|
|
|
}
|
2019-08-01 01:19:12 +03:00
|
|
|
|
|
|
|
testOptions {
|
|
|
|
unitTests.returnDefaultValues = true
|
2020-01-10 14:24:04 +03:00
|
|
|
animationsDisabled true
|
2019-08-01 01:19:12 +03:00
|
|
|
}
|
2017-02-23 17:11:56 +03:00
|
|
|
}
|
2014-10-03 14:33:41 +04:00
|
|
|
|
2017-02-23 17:11:56 +03:00
|
|
|
// 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
|
2016-08-15 15:01:00 +03:00
|
|
|
|
2014-10-03 14:33:41 +04:00
|
|
|
packagingOptions {
|
|
|
|
exclude 'META-INF/LICENSE.txt'
|
2017-04-12 15:34:43 +03:00
|
|
|
exclude 'META-INF/LICENSE'
|
2014-10-03 14:33:41 +04:00
|
|
|
}
|
2017-02-25 05:00:36 +03:00
|
|
|
|
2019-01-15 16:12:28 +03:00
|
|
|
tasks.register("checkstyle", Checkstyle) {
|
2016-10-09 02:33:12 +03:00
|
|
|
configFile = file("${rootProject.projectDir}/checkstyle.xml")
|
|
|
|
configProperties.checkstyleSuppressionsPath = file("${project.rootDir}/config/quality/checkstyle/suppressions.xml").absolutePath
|
|
|
|
source 'src'
|
|
|
|
include '**/*.java'
|
|
|
|
exclude '**/gen/**'
|
|
|
|
classpath = files()
|
|
|
|
}
|
|
|
|
|
2019-01-15 16:12:28 +03:00
|
|
|
tasks.register("pmd", Pmd) {
|
2019-04-11 16:22:55 +03:00
|
|
|
ruleSetFiles = files("${project.rootDir}/ruleset.xml")
|
2019-10-02 11:12:23 +03:00
|
|
|
ignoreFailures = true // should continue checking
|
2016-10-09 02:33:12 +03:00
|
|
|
ruleSets = []
|
|
|
|
|
|
|
|
source 'src'
|
|
|
|
include '**/*.java'
|
|
|
|
exclude '**/gen/**'
|
|
|
|
|
|
|
|
reports {
|
|
|
|
xml.enabled = false
|
|
|
|
html.enabled = true
|
|
|
|
xml {
|
2017-08-08 12:36:41 +03:00
|
|
|
destination = file("$project.buildDir/reports/pmd/pmd.xml")
|
2016-10-09 02:33:12 +03:00
|
|
|
}
|
|
|
|
html {
|
2017-08-08 12:36:41 +03:00
|
|
|
destination = file("$project.buildDir/reports/pmd/pmd.html")
|
2016-10-09 02:33:12 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-31 01:50:50 +03:00
|
|
|
android.applicationVariants.all { variant ->
|
|
|
|
String variantName = variant.name
|
2019-04-29 15:53:02 +03:00
|
|
|
String capVariantName = variantName.substring(0, 1).toUpperCase() + variantName.substring(1)
|
2020-06-19 12:05:47 +03:00
|
|
|
tasks.register("spotbugs${capVariantName}Report", SpotBugsTask) {
|
2019-10-02 11:12:23 +03:00
|
|
|
ignoreFailures = true // should continue checking
|
2019-03-31 01:50:50 +03:00
|
|
|
effort = "max"
|
|
|
|
reportLevel = "medium"
|
2019-08-21 08:07:09 +03:00
|
|
|
classes = fileTree("$project.buildDir/intermediates/javac/${variantName}/classes/")
|
2019-05-18 21:36:12 +03:00
|
|
|
excludeFilter = file("${project.rootDir}/spotbugs-filter.xml")
|
2019-03-31 01:50:50 +03:00
|
|
|
|
|
|
|
reports {
|
|
|
|
xml.enabled = false
|
|
|
|
html {
|
2020-06-17 10:50:15 +03:00
|
|
|
enabled = true
|
2019-03-31 01:50:50 +03:00
|
|
|
destination = file("$project.buildDir/reports/spotbugs/spotbugs.html")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-09 10:53:52 +03:00
|
|
|
check.dependsOn 'checkstyle', 'spotbugsGplayDebugReport', 'pmd', 'lint', 'ktlint', 'detekt'
|
2016-10-09 02:33:12 +03:00
|
|
|
|
2020-06-19 10:37:51 +03:00
|
|
|
buildFeatures {
|
|
|
|
dataBinding true
|
2020-06-19 11:55:02 +03:00
|
|
|
viewBinding true
|
2020-03-03 16:05:13 +03:00
|
|
|
}
|
2021-09-28 16:20:07 +03:00
|
|
|
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = "1.8"
|
|
|
|
}
|
2016-06-24 01:18:45 +03:00
|
|
|
}
|
2017-02-23 17:11:56 +03:00
|
|
|
|
|
|
|
dependencies {
|
2018-01-10 10:13:18 +03:00
|
|
|
// dependencies for app building
|
2018-12-18 05:16:42 +03:00
|
|
|
implementation 'androidx.multidex:multidex:2.0.1'
|
2017-12-15 13:36:55 +03:00
|
|
|
// implementation project('nextcloud-android-library')
|
2021-09-02 15:07:06 +03:00
|
|
|
implementation ("com.github.nextcloud:android-library:$androidLibraryVersion") {
|
|
|
|
exclude group: 'org.ogce', module: 'xpp3' // unused in Android and brings wrong Junit version
|
|
|
|
}
|
2020-05-24 13:34:05 +03:00
|
|
|
|
2019-11-29 12:12:13 +03:00
|
|
|
compileOnly 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2' // remove after entire switch to lib v2
|
|
|
|
implementation "commons-httpclient:commons-httpclient:3.1@jar" // remove after entire switch to lib v2
|
|
|
|
implementation 'org.apache.jackrabbit:jackrabbit-webdav:2.13.1' // remove after entire switch to lib v2
|
2021-09-29 14:02:05 +03:00
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
|
2018-12-07 15:28:35 +03:00
|
|
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
2021-07-18 00:56:42 +03:00
|
|
|
implementation 'com.google.android.material:material:1.4.0'
|
2017-08-08 12:36:41 +03:00
|
|
|
implementation 'com.jakewharton:disklrucache:2.0.2'
|
2021-07-25 01:21:28 +03:00
|
|
|
implementation 'androidx.appcompat:appcompat:1.3.1'
|
2021-06-07 16:24:04 +03:00
|
|
|
implementation 'androidx.webkit:webkit:1.4.0'
|
2018-12-07 15:28:35 +03:00
|
|
|
implementation 'androidx.cardview:cardview:1.0.0'
|
2021-08-06 08:23:50 +03:00
|
|
|
implementation 'androidx.exifinterface:exifinterface:1.3.3'
|
2021-03-25 05:04:26 +03:00
|
|
|
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1"
|
2021-01-28 05:04:16 +03:00
|
|
|
implementation "androidx.work:work-runtime:$workRuntime"
|
|
|
|
implementation "androidx.work:work-runtime-ktx:$workRuntime"
|
2021-07-22 04:05:39 +03:00
|
|
|
implementation "androidx.fragment:fragment-ktx:1.3.6"
|
2019-01-28 15:56:37 +03:00
|
|
|
implementation 'com.github.albfernandez:juniversalchardet:2.0.3' // need this version for Android <7
|
2021-01-05 23:49:52 +03:00
|
|
|
compileOnly 'com.google.code.findbugs:annotations:3.0.1u2'
|
2021-07-14 04:05:59 +03:00
|
|
|
implementation 'commons-io:commons-io:2.11.0'
|
2020-02-05 05:11:55 +03:00
|
|
|
implementation 'org.greenrobot:eventbus:3.2.0'
|
2021-09-13 04:16:32 +03:00
|
|
|
implementation 'com.googlecode.ez-vcard:ez-vcard:0.11.3'
|
2017-08-08 12:36:41 +03:00
|
|
|
implementation 'org.lukhnos:nnio:0.2'
|
2021-07-20 10:57:34 +03:00
|
|
|
implementation 'org.bouncycastle:bcpkix-jdk15to18:1.69'
|
2021-11-01 05:05:37 +03:00
|
|
|
implementation 'com.google.code.gson:gson:2.8.9'
|
2018-01-24 17:59:51 +03:00
|
|
|
implementation 'com.afollestad:sectioned-recyclerview:0.5.0'
|
2018-12-11 10:43:05 +03:00
|
|
|
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
|
2020-09-02 16:54:50 +03:00
|
|
|
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.21'
|
2018-11-29 12:37:30 +03:00
|
|
|
implementation 'com.github.tobiaskaminsky:qrcodescanner:0.1.2.2' // 'com.github.blikoon:QRCodeScanner:0.1.2'
|
2020-01-20 05:14:07 +03:00
|
|
|
implementation 'com.google.android:flexbox:2.0.1'
|
2020-02-07 05:15:34 +03:00
|
|
|
implementation 'org.parceler:parceler-api:1.1.13'
|
2020-02-07 11:58:21 +03:00
|
|
|
kapt 'org.parceler:parceler:1.1.13'
|
2019-09-24 00:26:28 +03:00
|
|
|
implementation('com.github.bumptech.glide:glide:3.8.0') {
|
2018-04-03 18:18:24 +03:00
|
|
|
exclude group: "com.android.support"
|
|
|
|
}
|
2019-05-29 04:13:24 +03:00
|
|
|
implementation 'com.caverock:androidsvg:1.4'
|
2021-03-25 05:03:37 +03:00
|
|
|
implementation 'androidx.annotation:annotation:1.2.0'
|
2021-09-28 04:05:10 +03:00
|
|
|
implementation 'com.vanniktech:emoji-google:0.8.0'
|
2019-04-29 15:53:02 +03:00
|
|
|
|
2021-04-30 04:05:08 +03:00
|
|
|
implementation "com.github.cotechde.hwsecurity:hwsecurity-fido:$fidoVersion"
|
|
|
|
implementation "com.github.cotechde.hwsecurity:hwsecurity-fido2:$fidoVersion"
|
2019-07-31 16:44:14 +03:00
|
|
|
|
2020-10-30 05:13:55 +03:00
|
|
|
spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.11.0'
|
2019-10-22 01:30:55 +03:00
|
|
|
spotbugsPlugins 'com.mebigfatguy.fb-contrib:fb-contrib:7.4.7'
|
2019-06-05 17:54:41 +03:00
|
|
|
|
2019-07-26 10:25:26 +03:00
|
|
|
implementation "com.google.dagger:dagger:$daggerVersion"
|
|
|
|
implementation "com.google.dagger:dagger-android:$daggerVersion"
|
|
|
|
implementation "com.google.dagger:dagger-android-support:$daggerVersion"
|
|
|
|
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
|
|
|
|
kapt "com.google.dagger:dagger-android-processor:$daggerVersion"
|
2019-04-29 15:53:02 +03:00
|
|
|
|
2021-08-06 22:24:18 +03:00
|
|
|
ktlint "com.pinterest:ktlint:0.42.1"
|
2021-05-11 09:36:03 +03:00
|
|
|
implementation 'org.conscrypt:conscrypt-android:2.5.2'
|
2019-05-23 12:58:59 +03:00
|
|
|
|
2021-09-29 14:08:24 +03:00
|
|
|
implementation 'com.google.android.exoplayer:exoplayer:2.15.1'
|
2021-03-08 15:18:22 +03:00
|
|
|
|
2020-04-29 09:24:39 +03:00
|
|
|
// Shimmer animation
|
2020-05-04 15:56:55 +03:00
|
|
|
implementation 'com.elyeproj.libraries:loaderviewlibrary:2.0.0'
|
2020-04-29 09:24:39 +03:00
|
|
|
|
2019-10-16 18:40:28 +03:00
|
|
|
// dependencies for markdown rendering
|
2019-10-24 11:42:29 +03:00
|
|
|
implementation "io.noties.markwon:core:$markwonVersion"
|
|
|
|
implementation "io.noties.markwon:ext-strikethrough:$markwonVersion"
|
|
|
|
implementation "io.noties.markwon:ext-tables:$markwonVersion"
|
|
|
|
implementation "io.noties.markwon:ext-tasklist:$markwonVersion"
|
|
|
|
implementation "io.noties.markwon:html:$markwonVersion"
|
|
|
|
|
|
|
|
implementation "io.noties.markwon:syntax-highlight:$markwonVersion"
|
|
|
|
implementation "io.noties:prism4j:$prismVersion"
|
|
|
|
kapt "io.noties:prism4j-bundler:$prismVersion"
|
2019-10-17 19:47:50 +03:00
|
|
|
|
2021-08-16 08:20:11 +03:00
|
|
|
implementation ('org.mnode.ical4j:ical4j:1.0.6') {
|
|
|
|
['org.apache.commons','commons-logging'].each {
|
|
|
|
exclude group: "$it"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-01 11:35:30 +03:00
|
|
|
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.7'
|
|
|
|
|
2018-01-10 10:13:18 +03:00
|
|
|
// dependencies for local unit tests
|
2021-02-15 05:04:43 +03:00
|
|
|
testImplementation 'junit:junit:4.13.2'
|
2020-08-21 10:30:13 +03:00
|
|
|
testImplementation "org.mockito:mockito-core:$mockitoVersion"
|
2021-07-18 00:56:42 +03:00
|
|
|
testImplementation "androidx.test:core:$androidxTestVersion"
|
2020-11-02 19:35:16 +03:00
|
|
|
testImplementation "org.powermock:powermock-core:$powermockVersion"
|
|
|
|
testImplementation "org.powermock:powermock-module-junit4:$powermockVersion"
|
|
|
|
testImplementation "org.powermock:powermock-api-mockito2:$powermockVersion"
|
2021-03-10 05:05:32 +03:00
|
|
|
testImplementation 'org.json:json:20210307'
|
2019-09-09 13:52:32 +03:00
|
|
|
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
|
2020-05-13 03:09:21 +03:00
|
|
|
testImplementation 'androidx.arch.core:core-testing:2.1.0'
|
2020-10-01 12:37:57 +03:00
|
|
|
testImplementation "io.mockk:mockk:$mockkVersion"
|
|
|
|
testImplementation "io.mockk:mockk-android:$mockkVersion"
|
2019-03-06 09:03:47 +03:00
|
|
|
|
2018-01-10 10:13:18 +03:00
|
|
|
// dependencies for instrumented tests
|
2017-02-23 17:11:56 +03:00
|
|
|
// JUnit4 Rules
|
2021-07-17 23:42:12 +03:00
|
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
2021-07-18 00:56:42 +03:00
|
|
|
androidTestImplementation "androidx.test:rules:$androidxTestVersion"
|
2017-02-23 17:11:56 +03:00
|
|
|
// Android JUnit Runner
|
2021-07-18 00:56:42 +03:00
|
|
|
androidTestImplementation "androidx.test:runner:$androidxTestVersion"
|
|
|
|
androidTestUtil "androidx.test:orchestrator:$androidxTestVersion"
|
2017-08-31 09:01:39 +03:00
|
|
|
|
2017-02-23 17:11:56 +03:00
|
|
|
// Espresso core
|
2020-08-27 16:11:54 +03:00
|
|
|
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion"
|
|
|
|
androidTestImplementation "androidx.test.espresso:espresso-contrib:$espressoVersion"
|
|
|
|
androidTestImplementation "androidx.test.espresso:espresso-web:$espressoVersion"
|
2020-10-15 10:27:43 +03:00
|
|
|
androidTestImplementation "androidx.test.espresso:espresso-accessibility:$espressoVersion"
|
2020-05-13 03:09:21 +03:00
|
|
|
|
|
|
|
// Mocking support
|
|
|
|
androidTestImplementation 'com.github.tmurakami:dexopener:2.0.5' // required to allow mocking on API 27 and older
|
|
|
|
androidTestImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
|
2020-08-21 10:30:13 +03:00
|
|
|
androidTestImplementation "org.mockito:mockito-core:$mockitoVersion"
|
|
|
|
androidTestImplementation("org.mockito:mockito-android:$mockitoVersion") {
|
2020-05-13 03:09:21 +03:00
|
|
|
exclude group: "net.bytebuddy", module: "byte-buddy-android"
|
|
|
|
}
|
2020-09-21 04:13:27 +03:00
|
|
|
androidTestImplementation "net.bytebuddy:byte-buddy:$byteBuddyVersion"
|
|
|
|
androidTestImplementation "net.bytebuddy:byte-buddy-android:$byteBuddyVersion"
|
2021-01-06 10:32:53 +03:00
|
|
|
androidTestImplementation "io.mockk:mockk-android:1.10.4"
|
2020-05-13 03:09:21 +03:00
|
|
|
androidTestImplementation 'androidx.arch.core:core-testing:2.0.1'
|
2021-09-03 08:35:27 +03:00
|
|
|
androidTestImplementation "com.facebook.testing.screenshot:core:0.13.0"
|
2020-05-13 03:09:21 +03:00
|
|
|
|
2017-02-23 17:11:56 +03:00
|
|
|
// UIAutomator - for cross-app UI tests, and to grant screen is turned on in Espresso tests
|
2018-12-10 19:26:53 +03:00
|
|
|
// androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
|
2017-02-23 17:11:56 +03:00
|
|
|
// fix conflict in dependencies; see http://g.co/androidstudio/app-test-app-conflict for details
|
2017-08-08 12:36:41 +03:00
|
|
|
//androidTestImplementation "com.android.support:support-annotations:${supportLibraryVersion}"
|
2021-10-18 04:20:19 +03:00
|
|
|
androidTestImplementation 'tools.fastlane:screengrab:2.1.1'
|
2021-05-25 09:58:37 +03:00
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
2020-01-20 10:34:51 +03:00
|
|
|
androidTestImplementation('com.android.support.test.espresso:espresso-intents:3.0.2')
|
2018-06-21 10:06:33 +03:00
|
|
|
|
2019-08-30 02:58:27 +03:00
|
|
|
implementation "com.github.stateless4j:stateless4j:2.6.0"
|
2017-02-23 17:11:56 +03:00
|
|
|
}
|
|
|
|
|
2017-03-28 01:11:56 +03:00
|
|
|
configurations.all {
|
2020-08-21 10:30:13 +03:00
|
|
|
resolutionStrategy{
|
|
|
|
cacheChangingModulesFor 0, 'seconds'
|
|
|
|
force 'org.objenesis:objenesis:2.6'
|
2021-10-06 13:35:51 +03:00
|
|
|
eachDependency { details ->
|
|
|
|
if ('org.jacoco' == details.requested.group) {
|
|
|
|
details.useVersion "$jacoco_version"
|
|
|
|
}
|
|
|
|
}
|
2020-08-21 10:30:13 +03:00
|
|
|
}
|
|
|
|
|
2017-03-28 01:11:56 +03:00
|
|
|
}
|
|
|
|
|
2017-02-23 17:11:56 +03:00
|
|
|
tasks.withType(Test) {
|
2018-01-10 10:13:18 +03:00
|
|
|
// increased logging for tests
|
2017-02-23 17:11:56 +03:00
|
|
|
testLogging {
|
|
|
|
events "passed", "skipped", "failed"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-03-29 18:43:08 +03:00
|
|
|
android.applicationVariants.all { variant ->
|
|
|
|
variant.outputs.all { output ->
|
|
|
|
outputFileName = "${output.baseName}-${variant.versionCode}.apk"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-15 16:12:28 +03:00
|
|
|
tasks.register("combinedTestReport", JacocoReport) {
|
2018-03-02 14:08:09 +03:00
|
|
|
|
2021-10-06 13:35:51 +03:00
|
|
|
jacocoClasspath = configurations['jacocoAnt']
|
|
|
|
|
2018-03-02 14:08:09 +03:00
|
|
|
reports {
|
2020-06-16 10:24:44 +03:00
|
|
|
xml.enabled true
|
|
|
|
html.enabled true
|
|
|
|
csv.enabled false
|
2018-03-02 14:08:09 +03:00
|
|
|
}
|
|
|
|
|
2020-06-16 10:24:44 +03:00
|
|
|
additionalSourceDirs.setFrom files(subprojects.sourceSets.main.allSource.srcDirs)
|
|
|
|
sourceDirectories.setFrom files(subprojects.sourceSets.main.allSource.srcDirs)
|
|
|
|
classDirectories.setFrom files(subprojects.sourceSets.main.output)
|
|
|
|
executionData.setFrom project.fileTree(dir: project.buildDir, includes: [
|
2018-07-11 15:57:02 +03:00
|
|
|
'jacoco/testGplayDebugUnitTest.exec', 'outputs/code-coverage/connected/flavors/GPLAY/*coverage.ec'
|
2018-03-02 14:08:09 +03:00
|
|
|
])
|
|
|
|
}
|
2019-05-23 12:58:59 +03:00
|
|
|
|
|
|
|
task ktlint(type: JavaExec, group: "verification") {
|
|
|
|
description = "Check Kotlin code style."
|
|
|
|
main = "com.pinterest.ktlint.Main"
|
|
|
|
classpath = configurations.ktlint
|
2019-05-19 13:07:39 +03:00
|
|
|
args "--reporter=plain", "--reporter=plain,output=${buildDir}/ktlint.txt,src/**/*.kt"
|
2019-05-23 12:58:59 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
task ktlintFormat(type: JavaExec, group: "formatting") {
|
|
|
|
description = "Fix Kotlin code style deviations."
|
|
|
|
main = "com.pinterest.ktlint.Main"
|
|
|
|
classpath = configurations.ktlint
|
|
|
|
args "-F", "src/**/*.kt"
|
|
|
|
}
|
2019-05-19 13:07:39 +03:00
|
|
|
|
2021-09-24 16:10:49 +03:00
|
|
|
task installGitHooks(type: Copy, group: "development") {
|
|
|
|
description = "Install git hooks"
|
|
|
|
from("${project.rootDir}/scripts/hooks") {
|
2021-09-24 15:07:11 +03:00
|
|
|
include '*'
|
|
|
|
}
|
|
|
|
into '.git/hooks'
|
|
|
|
}
|
|
|
|
|
2019-05-19 13:07:39 +03:00
|
|
|
detekt {
|
|
|
|
reports {
|
|
|
|
xml {
|
|
|
|
enabled = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
config = files("detekt.yml")
|
|
|
|
input = files("src/")
|
|
|
|
}
|
2020-12-17 20:39:05 +03:00
|
|
|
|
|
|
|
shot {
|
|
|
|
showOnlyFailingTestsInReports = ciBuild
|
|
|
|
}
|
2021-09-29 17:53:31 +03:00
|
|
|
|
|
|
|
jacoco {
|
2021-10-06 13:35:51 +03:00
|
|
|
toolVersion = "$jacoco_version"
|
2021-09-29 17:53:31 +03:00
|
|
|
}
|