2020-06-19 12:05:47 +03:00
|
|
|
import com.github.spotbugs.snom.SpotBugsTask
|
|
|
|
|
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 {
|
2020-12-09 05:16:00 +03:00
|
|
|
ext.kotlin_version = '1.4.21'
|
2014-10-03 14:33:41 +04:00
|
|
|
repositories {
|
2018-10-24 09:44:44 +03:00
|
|
|
google()
|
2016-08-16 16:04:43 +03:00
|
|
|
jcenter()
|
2017-02-22 01:56:13 +03:00
|
|
|
maven {
|
|
|
|
url 'https://oss.sonatype.org/content/repositories/snapshots/'
|
|
|
|
}
|
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 {
|
2020-11-11 05:12:49 +03:00
|
|
|
classpath 'com.android.tools.build:gradle:4.1.1'
|
2020-06-09 10:53:52 +03:00
|
|
|
classpath('com.hiya:jacoco-android:0.2')
|
2020-11-06 05:12:52 +03:00
|
|
|
classpath 'gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.6.0'
|
2019-05-06 14:50:28 +03:00
|
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
2020-10-21 04:12:09 +03:00
|
|
|
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.14.2"
|
2019-11-29 12:12:13 +03:00
|
|
|
classpath "commons-httpclient:commons-httpclient:3.1@jar" // remove after entire switch to lib v2
|
2020-11-04 14:42:11 +03:00
|
|
|
classpath 'com.karumi:shot:5.3.0'
|
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'
|
|
|
|
apply plugin: 'kotlin-android-extensions'
|
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
|
|
|
|
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
|
|
|
|
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
|
|
|
|
}
|
2017-03-06 16:16:31 +03:00
|
|
|
}
|
|
|
|
|
2016-04-27 15:48:05 +03:00
|
|
|
ext {
|
2018-09-13 04:14:21 +03:00
|
|
|
jacocoVersion = "0.8.2"
|
2020-11-24 05:14:01 +03:00
|
|
|
daggerVersion = "2.30.1"
|
2020-09-21 04:13:19 +03:00
|
|
|
markwonVersion = "4.6.0"
|
2019-10-17 19:47:50 +03:00
|
|
|
prismVersion = "2.0.0"
|
2020-08-13 04:13:36 +03:00
|
|
|
butterknifeVersion = "10.2.3"
|
2020-01-29 10:38:03 +03:00
|
|
|
androidLibraryVersion = "master-SNAPSHOT"
|
2020-11-26 05:20:15 +03:00
|
|
|
mockitoVersion = "3.6.28"
|
2020-10-01 12:37:57 +03:00
|
|
|
mockkVersion = "1.10.2"
|
2020-11-02 19:35:16 +03:00
|
|
|
powermockVersion = "2.0.9"
|
2020-11-02 05:15:11 +03:00
|
|
|
byteBuddyVersion = "1.10.18"
|
2020-08-27 16:11:54 +03:00
|
|
|
espressoVersion = "3.3.0"
|
2016-08-16 18:22:22 +03:00
|
|
|
|
|
|
|
travisBuild = System.getenv("TRAVIS") == "true"
|
|
|
|
|
2020-06-19 12:05:47 +03:00
|
|
|
// allows for -D pre-dex=false to be set
|
2020-06-19 11:55:02 +03:00
|
|
|
preDexEnabled = "true" == System.getProperty("pre-dex", "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-08-16 16:04:43 +03:00
|
|
|
jcenter()
|
2016-06-07 15:02:36 +03:00
|
|
|
maven { url "https://jitpack.io" }
|
2017-11-28 17:01:14 +03:00
|
|
|
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
|
2017-08-07 12:53:58 +03:00
|
|
|
|
2014-10-03 14:33:41 +04:00
|
|
|
flatDir {
|
|
|
|
dirs 'libs'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-02-12 14:38:38 +03:00
|
|
|
// semantic versioning for version code
|
|
|
|
def versionMajor = 3
|
2020-10-30 15:22:20 +03:00
|
|
|
def versionMinor = 15
|
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
|
|
|
}
|
|
|
|
|
2020-06-19 11:37:25 +03:00
|
|
|
|
2019-03-31 01:50:50 +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
|
|
|
|
|
|
|
dexOptions {
|
|
|
|
javaMaxHeapSize "4g"
|
|
|
|
}
|
|
|
|
|
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 {
|
2020-11-26 20:45:26 +03:00
|
|
|
minSdkVersion 21
|
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
|
|
|
|
2016-08-16 18:22:22 +03:00
|
|
|
dexOptions {
|
2020-06-19 12:05:47 +03:00
|
|
|
// Skip pre-dexing when running on Travis CI or when disabled via -D pre-dex=false.
|
2016-08-16 18:22:22 +03:00
|
|
|
preDexLibraries = preDexEnabled && !travisBuild
|
|
|
|
}
|
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
|
|
|
|
2017-05-05 21:00:52 +03:00
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
2019-08-11 15:11:21 +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
|
|
|
}
|
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')
|
2019-05-07 18:00:22 +03:00
|
|
|
genericImplementation "com.github.nextcloud:android-library:$androidLibraryVersion"
|
|
|
|
gplayImplementation "com.github.nextcloud:android-library:$androidLibraryVersion"
|
|
|
|
versionDevImplementation "com.github.nextcloud:android-library:$androidLibraryVersion"
|
2019-05-23 10:48:54 +03:00
|
|
|
qaImplementation "com.github.nextcloud:android-library:$androidLibraryVersion"
|
2020-05-24 13:34:05 +03:00
|
|
|
|
|
|
|
kapt 'javax.xml.bind:jaxb-api:2.3.1'
|
|
|
|
kapt 'org.glassfish.jaxb:jaxb-core:2.3.0.1'
|
|
|
|
kapt 'org.glassfish.jaxb:jaxb-runtime:2.3.3'
|
|
|
|
|
|
|
|
annotationProcessor 'javax.xml.bind:jaxb-api:2.3.1'
|
|
|
|
annotationProcessor 'org.glassfish.jaxb:jaxb-core:2.3.0.1'
|
|
|
|
annotationProcessor 'org.glassfish.jaxb:jaxb-runtime:2.3.3'
|
|
|
|
|
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
|
2020-10-30 05:13:02 +03:00
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
2018-12-07 15:28:35 +03:00
|
|
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
2020-09-03 04:12:14 +03:00
|
|
|
implementation 'com.google.android.material:material:1.2.1'
|
2017-08-08 12:36:41 +03:00
|
|
|
implementation 'com.jakewharton:disklrucache:2.0.2'
|
2020-05-15 11:48:00 +03:00
|
|
|
implementation 'androidx.appcompat:appcompat:1.2.0-rc01'
|
2018-12-07 15:28:35 +03:00
|
|
|
implementation 'androidx.cardview:cardview:1.0.0'
|
2020-12-07 19:48:20 +03:00
|
|
|
implementation 'androidx.exifinterface:exifinterface:1.3.2'
|
2020-01-23 05:14:45 +03:00
|
|
|
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0"
|
2020-07-23 04:13:22 +03:00
|
|
|
implementation "androidx.work:work-runtime:2.4.0"
|
2020-07-23 04:12:54 +03:00
|
|
|
implementation "androidx.work:work-runtime-ktx:2.4.0"
|
2020-06-23 13:20:31 +03:00
|
|
|
implementation "androidx.fragment:fragment:1.2.5"
|
2019-01-28 15:56:37 +03:00
|
|
|
implementation 'com.github.albfernandez:juniversalchardet:2.0.3' // need this version for Android <7
|
2019-12-03 15:31:02 +03:00
|
|
|
compileOnly 'com.google.code.findbugs:annotations:2.0.1'
|
2020-09-10 04:14:06 +03:00
|
|
|
implementation 'commons-io:commons-io:2.8.0'
|
2020-08-04 17:09:21 +03:00
|
|
|
implementation "com.jakewharton:butterknife:$butterknifeVersion"
|
|
|
|
kapt "com.jakewharton:butterknife-compiler:$butterknifeVersion"
|
2020-02-05 05:11:55 +03:00
|
|
|
implementation 'org.greenrobot:eventbus:3.2.0'
|
2020-11-09 05:13:03 +03:00
|
|
|
implementation 'com.googlecode.ez-vcard:ez-vcard:0.11.2'
|
2017-08-08 12:36:41 +03:00
|
|
|
implementation 'org.lukhnos:nnio:0.2'
|
2020-11-02 05:16:17 +03:00
|
|
|
implementation 'org.bouncycastle:bcpkix-jdk15to18:1.67'
|
2019-10-07 04:13:36 +03:00
|
|
|
implementation 'com.google.code.gson:gson:2.8.6'
|
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'
|
2019-06-06 04:13:19 +03:00
|
|
|
implementation 'androidx.annotation:annotation:1.1.0'
|
2019-10-07 04:13:36 +03:00
|
|
|
implementation 'com.google.code.gson:gson:2.8.6'
|
2020-11-03 17:54:47 +03:00
|
|
|
implementation 'com.vanniktech:emoji-google:0.7.0'
|
2019-04-29 15:53:02 +03:00
|
|
|
|
2020-06-30 20:34:17 +03:00
|
|
|
implementation 'com.github.cotechde.hwsecurity:hwsecurity-fido:4.1.0'
|
|
|
|
implementation 'com.github.cotechde.hwsecurity:hwsecurity-fido2:4.1.0'
|
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
|
|
|
|
2020-12-07 05:15:15 +03:00
|
|
|
ktlint "com.pinterest:ktlint:0.40.0"
|
2020-09-11 04:13:51 +03:00
|
|
|
implementation 'org.conscrypt:conscrypt-android:2.5.1'
|
2019-05-23 12:58:59 +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
|
|
|
|
2018-01-10 10:13:18 +03:00
|
|
|
// dependencies for local unit tests
|
2020-10-12 04:12:36 +03:00
|
|
|
testImplementation 'junit:junit:4.13.1'
|
2020-08-21 10:30:13 +03:00
|
|
|
testImplementation "org.mockito:mockito-core:$mockitoVersion"
|
2020-08-26 04:15:52 +03:00
|
|
|
testImplementation 'androidx.test:core:1.3.0'
|
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"
|
2020-11-16 05:13:43 +03:00
|
|
|
testImplementation 'org.json:json:20201115'
|
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
|
2020-09-01 14:07:41 +03:00
|
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
2020-09-02 12:10:08 +03:00
|
|
|
androidTestImplementation 'androidx.test:rules:1.3.0'
|
2017-02-23 17:11:56 +03:00
|
|
|
// Android JUnit Runner
|
2020-08-28 13:22:33 +03:00
|
|
|
androidTestImplementation 'androidx.test:runner:1.3.0'
|
2020-08-26 04:14:01 +03:00
|
|
|
androidTestUtil 'androidx.test:orchestrator:1.3.0'
|
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"
|
2020-05-13 03:09:21 +03:00
|
|
|
androidTestImplementation "io.mockk:mockk-android:1.10.0"
|
|
|
|
androidTestImplementation 'androidx.arch.core:core-testing:2.0.1'
|
|
|
|
|
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}"
|
2019-12-19 09:43:41 +03:00
|
|
|
androidTestImplementation 'tools.fastlane:screengrab:2.0.0'
|
2019-05-06 14:50:28 +03:00
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$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
|
|
|
|
2018-03-02 14:08:09 +03:00
|
|
|
// jacocoAnt "org.jacoco:org.jacoco.ant:${jacocoVersion}"
|
|
|
|
// jacocoAgent "org.jacoco:org.jacoco.agent:${jacocoVersion}"
|
|
|
|
// androidJacocoAgent "org.jacoco:org.jacoco.agent:${jacocoVersion}"
|
|
|
|
// androidJacocoAnt "org.jacoco:org.jacoco.ant:${jacocoVersion}"
|
|
|
|
// androidJacocoAnt "org.jacoco:org.jacoco.core:${jacocoVersion}"
|
|
|
|
// androidJacocoAnt "org.jacoco:org.jacoco.report:${jacocoVersion}"
|
|
|
|
// androidJacocoAnt "org.jacoco:org.jacoco.agent:${jacocoVersion}"
|
2019-08-30 02:58:27 +03:00
|
|
|
|
|
|
|
implementation "com.github.stateless4j:stateless4j:2.6.0"
|
2017-02-23 17:11:56 +03:00
|
|
|
}
|
|
|
|
|
2020-06-25 17:51:33 +03:00
|
|
|
spotbugs {
|
|
|
|
toolVersion = '3.1.12'
|
|
|
|
}
|
|
|
|
|
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'
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
detekt {
|
|
|
|
reports {
|
|
|
|
xml {
|
|
|
|
enabled = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
config = files("detekt.yml")
|
|
|
|
input = files("src/")
|
|
|
|
}
|