2024-01-29 14:35:23 +03:00
|
|
|
import com.github.spotbugs.snom.Confidence
|
|
|
|
import com.github.spotbugs.snom.Effort
|
2024-02-22 12:13:22 +03:00
|
|
|
import com.github.spotbugs.snom.SpotBugsTask
|
2022-03-11 13:10:51 +03:00
|
|
|
import org.gradle.internal.jvm.Jvm
|
|
|
|
|
|
|
|
buildscript {
|
|
|
|
dependencies {
|
2023-01-30 09:52:31 +03:00
|
|
|
classpath "com.android.tools.build:gradle:$androidPluginVersion"
|
2024-03-01 11:50:23 +03:00
|
|
|
classpath 'com.github.spotbugs.snom:spotbugs-gradle-plugin:6.0.8'
|
2022-03-11 13:10:51 +03:00
|
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
2024-02-02 11:30:00 +03:00
|
|
|
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.5"
|
2022-03-11 13:10:51 +03:00
|
|
|
classpath "commons-httpclient:commons-httpclient:3.1@jar" // remove after entire switch to lib v2
|
2024-02-14 17:23:36 +03:00
|
|
|
classpath 'com.karumi:shot:6.1.0'
|
2022-03-11 13:10: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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-07 18:42:29 +03:00
|
|
|
plugins {
|
2023-07-24 04:07:48 +03:00
|
|
|
id "com.diffplug.spotless" version "6.20.0"
|
2024-03-12 15:13:58 +03:00
|
|
|
id 'com.google.devtools.ksp' version '1.9.22-1.0.17' apply false
|
2022-10-07 18:42:29 +03:00
|
|
|
}
|
|
|
|
|
2022-03-11 13:10:51 +03:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
|
|
apply plugin: 'kotlin-android'
|
|
|
|
apply plugin: 'kotlin-kapt'
|
|
|
|
apply plugin: 'kotlin-parcelize'
|
|
|
|
apply plugin: 'checkstyle'
|
|
|
|
apply plugin: 'pmd'
|
2023-05-08 20:06:33 +03:00
|
|
|
apply from: "$rootProject.projectDir/jacoco.gradle"
|
2022-03-11 13:10:51 +03:00
|
|
|
apply plugin: 'com.github.spotbugs'
|
|
|
|
apply plugin: 'io.gitlab.arturbosch.detekt'
|
2024-02-22 12:13:22 +03:00
|
|
|
|
|
|
|
// needed to make renovate run without shot, as shot requires Android SDK
|
|
|
|
// https://github.com/pedrovgs/Shot/issues/300
|
|
|
|
if (shotTest) {
|
|
|
|
apply plugin: 'shot'
|
|
|
|
}
|
2023-08-29 10:08:39 +03:00
|
|
|
apply plugin: 'com.google.devtools.ksp'
|
|
|
|
|
2022-03-11 13:10:51 +03:00
|
|
|
|
|
|
|
println "Gradle uses Java ${Jvm.current()}"
|
|
|
|
|
|
|
|
configurations {
|
2023-08-29 10:08:39 +03:00
|
|
|
configureEach {
|
2022-03-11 13:10:51 +03:00
|
|
|
exclude group: 'org.jetbrains', module: 'annotations-java5' // via prism4j, already using annotations explicitly
|
|
|
|
|
|
|
|
// check for updates every build
|
|
|
|
resolutionStrategy {
|
|
|
|
cacheChangingModulesFor 0, 'seconds'
|
|
|
|
exclude group: "org.jetbrains.kotlinx", module: "kotlinx-coroutines-debug"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
configurations.configureEach {
|
|
|
|
resolutionStrategy.eachDependency {
|
|
|
|
if (requested.group == "org.checkerframework" && requested.name != "checker-compat-qual") {
|
|
|
|
useVersion(checkerVersion)
|
|
|
|
because("https://github.com/google/ExoPlayer/issues/10007")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// semantic versioning for version code
|
|
|
|
def versionMajor = 3
|
2024-01-19 12:18:31 +03:00
|
|
|
def versionMinor = 29
|
2022-03-11 13:10:51 +03:00
|
|
|
def versionPatch = 0
|
|
|
|
def versionBuild = 0 // 0-50=Alpha / 51-98=RC / 90-99=stable
|
|
|
|
|
2022-03-15 16:41:05 +03:00
|
|
|
|
|
|
|
def ndkEnv = new HashMap<String, String>()
|
|
|
|
file("$project.rootDir/ndk.env").readLines().each() {
|
|
|
|
def (key, value) = it.tokenize('=')
|
|
|
|
ndkEnv.put(key, value)
|
|
|
|
}
|
|
|
|
|
2022-11-23 12:37:35 +03:00
|
|
|
def perfAnalysis = project.hasProperty('perfAnalysis')
|
|
|
|
|
2022-03-11 13:10:51 +03:00
|
|
|
android {
|
2022-03-15 12:22:23 +03:00
|
|
|
// install this NDK version and Cmake to produce smaller APKs. Build will still work if not installed
|
2022-03-15 16:41:05 +03:00
|
|
|
ndkVersion "${ndkEnv.get("NDK_VERSION")}"
|
2022-03-11 13:10:51 +03:00
|
|
|
|
2022-09-16 12:00:39 +03:00
|
|
|
|
|
|
|
namespace 'com.owncloud.android'
|
|
|
|
testNamespace "${namespace}.test"
|
|
|
|
|
|
|
|
|
2022-03-11 13:10:51 +03:00
|
|
|
defaultConfig {
|
2023-03-24 10:52:25 +03:00
|
|
|
minSdkVersion 24
|
2023-10-30 11:58:19 +03:00
|
|
|
targetSdkVersion 34
|
|
|
|
compileSdk 34
|
2022-03-11 13:10:51 +03:00
|
|
|
|
|
|
|
buildConfigField 'boolean', 'CI', ciBuild.toString()
|
2022-11-23 12:37:35 +03:00
|
|
|
buildConfigField 'boolean', 'RUNTIME_PERF_ANALYSIS', perfAnalysis.toString()
|
2022-03-11 13:10:51 +03:00
|
|
|
|
2022-11-03 18:38:19 +03:00
|
|
|
javaCompileOptions {
|
|
|
|
annotationProcessorOptions {
|
|
|
|
arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-11 13:10:51 +03:00
|
|
|
// arguments to be passed to functional tests
|
2024-02-22 12:13:22 +03:00
|
|
|
if (shotTest) {
|
|
|
|
testInstrumentationRunner "com.karumi.shot.ShotTestRunner"
|
|
|
|
} else {
|
|
|
|
testInstrumentationRunner "com.nextcloud.client.TestRunner"
|
|
|
|
}
|
2022-03-11 13:10:51 +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}"
|
|
|
|
testInstrumentationRunnerArguments disableAnalytics: 'true'
|
|
|
|
|
|
|
|
multiDexEnabled true
|
|
|
|
|
|
|
|
versionCode versionMajor * 10000000 + versionMinor * 10000 + versionPatch * 100 + versionBuild
|
|
|
|
|
|
|
|
if (versionBuild > 89) {
|
|
|
|
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
|
|
|
|
} else if (versionBuild > 50) {
|
|
|
|
versionName "${versionMajor}.${versionMinor}.${versionPatch} RC" + (versionBuild - 50)
|
|
|
|
} else {
|
|
|
|
versionName "${versionMajor}.${versionMinor}.${versionPatch} Alpha" + (versionBuild + 1)
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
2023-08-29 10:08:39 +03:00
|
|
|
flavorDimensions += "default"
|
2022-03-11 13:10:51 +03:00
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
debug {
|
2022-09-07 14:19:50 +03:00
|
|
|
testCoverageEnabled(project.hasProperty('coverage'))
|
2022-03-11 13:10:51 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-12-01 19:37:35 +03:00
|
|
|
buildFeatures {
|
|
|
|
buildConfig = true
|
|
|
|
}
|
|
|
|
|
2022-03-11 13:10:51 +03:00
|
|
|
productFlavors {
|
|
|
|
// used for f-droid
|
|
|
|
generic {
|
|
|
|
applicationId 'com.nextcloud.client'
|
|
|
|
dimension "default"
|
|
|
|
}
|
|
|
|
|
|
|
|
gplay {
|
|
|
|
applicationId 'com.nextcloud.client'
|
|
|
|
dimension "default"
|
|
|
|
}
|
|
|
|
|
|
|
|
huawei {
|
|
|
|
applicationId 'com.nextcloud.client'
|
|
|
|
dimension "default"
|
|
|
|
}
|
|
|
|
|
|
|
|
versionDev {
|
|
|
|
applicationId "com.nextcloud.android.beta"
|
|
|
|
dimension "default"
|
2024-03-16 04:47:31 +03:00
|
|
|
versionCode 20240316
|
|
|
|
versionName "20240316"
|
2022-03-11 13:10:51 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
qa {
|
|
|
|
applicationId "com.nextcloud.android.qa"
|
|
|
|
dimension "default"
|
|
|
|
versionCode 1
|
|
|
|
versionName "1"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-03 18:38:19 +03:00
|
|
|
|
2022-03-11 13:10:51 +03:00
|
|
|
testOptions {
|
|
|
|
unitTests.returnDefaultValues = true
|
|
|
|
animationsDisabled true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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
|
|
|
|
packagingOptions {
|
|
|
|
resources {
|
2022-09-30 11:00:24 +03:00
|
|
|
excludes += 'META-INF/LICENSE*'
|
|
|
|
pickFirst 'MANIFEST.MF' // workaround for duplicated manifest on some dependencies
|
2022-03-11 13:10:51 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.register("checkstyle", Checkstyle) {
|
|
|
|
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()
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.register("pmd", Pmd) {
|
|
|
|
ruleSetFiles = files("${project.rootDir}/ruleset.xml")
|
|
|
|
ignoreFailures = true // should continue checking
|
|
|
|
ruleSets = []
|
|
|
|
|
|
|
|
source 'src'
|
|
|
|
include '**/*.java'
|
|
|
|
exclude '**/gen/**'
|
|
|
|
|
|
|
|
reports {
|
|
|
|
xml {
|
|
|
|
destination = file("$project.buildDir/reports/pmd/pmd.xml")
|
|
|
|
}
|
|
|
|
html {
|
|
|
|
destination = file("$project.buildDir/reports/pmd/pmd.html")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-07 18:49:05 +03:00
|
|
|
check.dependsOn 'checkstyle', 'spotbugsGplayDebug', 'pmd', 'lint', 'spotlessKotlinCheck', 'detekt'
|
2022-03-11 13:10:51 +03:00
|
|
|
|
|
|
|
buildFeatures {
|
|
|
|
dataBinding true
|
|
|
|
viewBinding true
|
2023-05-08 19:30:06 +03:00
|
|
|
aidl true
|
2024-02-26 18:57:41 +03:00
|
|
|
compose = true
|
2022-03-11 13:10:51 +03:00
|
|
|
}
|
|
|
|
|
2023-05-09 10:01:19 +03:00
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
|
|
targetCompatibility JavaVersion.VERSION_17
|
2022-03-11 13:10:51 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
kotlinOptions {
|
2023-05-08 19:37:38 +03:00
|
|
|
jvmTarget = "17"
|
2022-03-11 13:10:51 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
lint {
|
|
|
|
abortOnError false
|
|
|
|
checkGeneratedSources true
|
|
|
|
disable 'MissingTranslation', 'GradleDependency', 'VectorPath', 'IconMissingDensityFolder', 'IconDensities', 'GoogleAppIndexingWarning', 'MissingDefaultResource', 'InvalidPeriodicWorkRequestInterval', 'StringFormatInvalid', 'MissingQuantity'
|
|
|
|
htmlOutput file("$project.buildDir/reports/lint/lint.html")
|
|
|
|
htmlReport true
|
|
|
|
}
|
|
|
|
|
2023-01-24 13:21:01 +03:00
|
|
|
sourceSets {
|
|
|
|
// Adds exported schema location as test app assets.
|
|
|
|
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
|
|
|
|
}
|
2024-02-26 18:57:41 +03:00
|
|
|
|
|
|
|
composeOptions {
|
2024-03-04 18:22:30 +03:00
|
|
|
kotlinCompilerExtensionVersion = "1.5.10"
|
2024-02-26 18:57:41 +03:00
|
|
|
}
|
2022-03-11 13:10:51 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
// dependencies for app building
|
|
|
|
implementation 'androidx.multidex:multidex:2.0.1'
|
2022-09-07 14:19:50 +03:00
|
|
|
implementation("com.github.nextcloud:android-library:$androidLibraryVersion") {
|
2022-03-11 13:10:51 +03:00
|
|
|
exclude group: 'org.ogce', module: 'xpp3' // unused in Android and brings wrong Junit version
|
|
|
|
}
|
|
|
|
|
2024-02-26 18:57:41 +03:00
|
|
|
// Jetpack Compose
|
2024-03-01 17:43:17 +03:00
|
|
|
implementation(platform("androidx.compose:compose-bom:2024.02.01"))
|
2024-02-26 18:57:41 +03:00
|
|
|
implementation("androidx.compose.ui:ui")
|
|
|
|
implementation("androidx.compose.ui:ui-graphics")
|
|
|
|
implementation("androidx.compose.material3:material3")
|
2024-03-04 18:39:34 +03:00
|
|
|
implementation("androidx.compose.ui:ui-tooling-preview:1.6.2")
|
2024-03-04 18:52:58 +03:00
|
|
|
debugImplementation 'androidx.compose.ui:ui-tooling:1.6.2'
|
2024-02-26 18:57:41 +03:00
|
|
|
|
2023-01-24 13:21:01 +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
|
2022-03-11 13:10:51 +03:00
|
|
|
implementation "commons-httpclient:commons-httpclient:3.1@jar" // remove after entire switch to lib v2
|
|
|
|
implementation 'org.apache.jackrabbit:jackrabbit-webdav:2.13.5' // remove after entire switch to lib v2
|
2022-05-20 04:05:41 +03:00
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
2022-03-11 13:10:51 +03:00
|
|
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
2024-01-30 11:50:21 +03:00
|
|
|
implementation 'com.google.android.material:material:1.11.0'
|
2022-03-11 13:10:51 +03:00
|
|
|
implementation 'com.jakewharton:disklrucache:2.0.2'
|
2023-01-20 18:43:28 +03:00
|
|
|
implementation "androidx.appcompat:appcompat:$appCompatVersion"
|
2024-02-04 18:01:12 +03:00
|
|
|
implementation 'androidx.webkit:webkit:1.10.0'
|
2022-03-11 13:10:51 +03:00
|
|
|
implementation 'androidx.cardview:cardview:1.0.0'
|
2024-01-29 10:02:48 +03:00
|
|
|
implementation 'androidx.exifinterface:exifinterface:1.3.7'
|
2024-01-29 22:44:39 +03:00
|
|
|
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0"
|
2022-03-11 13:10:51 +03:00
|
|
|
implementation "androidx.work:work-runtime:$workRuntime"
|
|
|
|
implementation "androidx.work:work-runtime-ktx:$workRuntime"
|
2024-01-29 10:14:20 +03:00
|
|
|
implementation "androidx.fragment:fragment-ktx:1.6.2"
|
2022-03-11 13:10:51 +03:00
|
|
|
implementation 'com.github.albfernandez:juniversalchardet:2.0.3' // need this version for Android <7
|
|
|
|
compileOnly 'com.google.code.findbugs:annotations:3.0.1u2'
|
2024-02-04 18:04:42 +03:00
|
|
|
implementation 'commons-io:commons-io:2.15.1'
|
2022-03-11 13:10:51 +03:00
|
|
|
implementation 'org.greenrobot:eventbus:3.3.1'
|
2024-02-04 18:10:04 +03:00
|
|
|
implementation 'com.googlecode.ez-vcard:ez-vcard:0.12.1'
|
2024-01-30 23:45:05 +03:00
|
|
|
implementation 'org.lukhnos:nnio:0.3'
|
2024-02-23 10:41:01 +03:00
|
|
|
implementation 'org.bouncycastle:bcpkix-jdk18on:1.77'
|
2023-01-09 05:02:54 +03:00
|
|
|
implementation 'com.google.code.gson:gson:2.10.1'
|
2022-08-17 13:17:29 +03:00
|
|
|
implementation 'com.github.nextcloud-deps:sectioned-recyclerview:0.6.1'
|
2022-03-11 13:10:51 +03:00
|
|
|
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
|
2024-01-29 12:35:58 +03:00
|
|
|
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.28'
|
2022-08-17 13:17:29 +03:00
|
|
|
implementation 'com.github.nextcloud-deps:qrcodescanner:0.1.2.4' // 'com.github.blikoon:QRCodeScanner:0.1.2'
|
2022-04-29 17:13:04 +03:00
|
|
|
implementation 'com.google.android.flexbox:flexbox:3.0.0'
|
2022-03-11 13:10:51 +03:00
|
|
|
implementation('com.github.bumptech.glide:glide:3.8.0') {
|
|
|
|
exclude group: "com.android.support"
|
|
|
|
}
|
|
|
|
implementation 'com.caverock:androidsvg:1.4'
|
2024-01-29 22:39:42 +03:00
|
|
|
implementation 'androidx.annotation:annotation:1.7.1'
|
2024-02-04 18:12:06 +03:00
|
|
|
implementation 'com.vanniktech:emoji-google:0.18.0'
|
2022-03-11 13:10:51 +03:00
|
|
|
|
2022-11-02 19:53:25 +03:00
|
|
|
implementation "com.github.nextcloud-deps.hwsecurity:hwsecurity-fido:$fidoVersion"
|
|
|
|
implementation "com.github.nextcloud-deps.hwsecurity:hwsecurity-fido2:$fidoVersion"
|
2022-03-11 13:10:51 +03:00
|
|
|
|
2022-04-06 15:40:33 +03:00
|
|
|
// document scanner not available on FDroid (generic) due to OpenCV binaries
|
2023-01-20 18:43:28 +03:00
|
|
|
gplayImplementation project(':appscan')
|
|
|
|
huaweiImplementation project(':appscan')
|
|
|
|
qaImplementation project(':appscan')
|
2022-03-11 13:10:51 +03:00
|
|
|
|
2024-02-26 18:16:07 +03:00
|
|
|
spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.13.0'
|
2024-02-14 14:06:05 +03:00
|
|
|
spotbugsPlugins 'com.mebigfatguy.fb-contrib:fb-contrib:7.6.4'
|
2022-03-11 13:10:51 +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"
|
|
|
|
|
|
|
|
implementation 'org.conscrypt:conscrypt-android:2.5.2'
|
|
|
|
|
2024-03-07 14:10:35 +03:00
|
|
|
implementation "androidx.media3:media3-ui:$androidxMediaVersion"
|
|
|
|
implementation "androidx.media3:media3-exoplayer:$androidxMediaVersion"
|
|
|
|
implementation "androidx.media3:media3-datasource-okhttp:$androidxMediaVersion"
|
2022-03-11 13:10:51 +03:00
|
|
|
|
2024-02-04 18:12:47 +03:00
|
|
|
implementation 'me.zhanghai.android.fastscroll:library:1.3.0'
|
2022-09-07 14:19:50 +03:00
|
|
|
|
2022-03-11 13:10:51 +03:00
|
|
|
// Shimmer animation
|
2022-04-29 17:13:04 +03:00
|
|
|
implementation 'io.github.elye:loaderviewlibrary:3.0.0'
|
2022-03-11 13:10:51 +03:00
|
|
|
|
|
|
|
// dependencies for markdown rendering
|
|
|
|
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"
|
|
|
|
|
2023-06-16 14:43:50 +03:00
|
|
|
// dependencies for image cropping and rotation
|
|
|
|
implementation 'com.vanniktech:android-image-cropper:4.5.0'
|
|
|
|
|
2024-01-29 10:07:16 +03:00
|
|
|
implementation 'org.osmdroid:osmdroid-android:6.1.18'
|
2023-08-09 18:03:20 +03:00
|
|
|
|
2022-09-07 14:19:50 +03:00
|
|
|
implementation('org.mnode.ical4j:ical4j:3.0.0') {
|
|
|
|
['org.apache.commons', 'commons-logging'].each {
|
2022-03-11 13:10:51 +03:00
|
|
|
exclude group: "$it"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-23 12:37:35 +03:00
|
|
|
if (perfAnalysis) {
|
2024-02-02 11:30:38 +03:00
|
|
|
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.13'
|
2022-03-11 13:10:51 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// dependencies for local unit tests
|
|
|
|
testImplementation 'junit:junit:4.13.2'
|
|
|
|
testImplementation "org.mockito:mockito-core:$mockitoVersion"
|
|
|
|
testImplementation "androidx.test:core:$androidxTestVersion"
|
2024-03-04 09:45:55 +03:00
|
|
|
testImplementation 'org.json:json:20240303'
|
2022-03-11 13:10:51 +03:00
|
|
|
testImplementation "org.mockito.kotlin:mockito-kotlin:$mockitoKotlinVersion"
|
2023-02-23 05:13:54 +03:00
|
|
|
testImplementation 'androidx.arch.core:core-testing:2.2.0'
|
2022-03-11 13:10:51 +03:00
|
|
|
testImplementation "io.mockk:mockk:$mockkVersion"
|
|
|
|
testImplementation "io.mockk:mockk-android:$mockkVersion"
|
|
|
|
|
|
|
|
// dependencies for instrumented tests
|
|
|
|
// JUnit4 Rules
|
2023-01-04 05:01:35 +03:00
|
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
2022-03-11 13:10:51 +03:00
|
|
|
androidTestImplementation "androidx.test:rules:$androidxTestVersion"
|
|
|
|
// Android JUnit Runner
|
2024-02-04 15:47:03 +03:00
|
|
|
androidTestImplementation "androidx.test:runner:1.5.2"
|
2024-02-01 15:56:26 +03:00
|
|
|
androidTestUtil "androidx.test:orchestrator:1.4.2"
|
2022-04-26 13:02:33 +03:00
|
|
|
androidTestImplementation "androidx.test:core-ktx:$androidxTestVersion"
|
2022-03-11 13:10:51 +03:00
|
|
|
|
2022-03-16 12:01:04 +03:00
|
|
|
// Espresso
|
2022-03-11 13:10:51 +03:00
|
|
|
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion"
|
|
|
|
androidTestImplementation "androidx.test.espresso:espresso-contrib:$espressoVersion"
|
|
|
|
androidTestImplementation "androidx.test.espresso:espresso-web:$espressoVersion"
|
|
|
|
androidTestImplementation "androidx.test.espresso:espresso-accessibility:$espressoVersion"
|
2022-03-16 12:01:04 +03:00
|
|
|
androidTestImplementation "androidx.test.espresso:espresso-intents:$espressoVersion"
|
2022-03-11 13:10:51 +03:00
|
|
|
|
|
|
|
// Mocking support
|
|
|
|
androidTestImplementation 'com.github.tmurakami:dexopener:2.0.5' // required to allow mocking on API 27 and older
|
|
|
|
androidTestImplementation "org.mockito.kotlin:mockito-kotlin:$mockitoKotlinVersion"
|
|
|
|
androidTestImplementation "org.mockito:mockito-core:$mockitoVersion"
|
2022-06-27 12:35:24 +03:00
|
|
|
androidTestImplementation("org.mockito:mockito-android:$mockitoVersion")
|
2022-03-11 13:10:51 +03:00
|
|
|
androidTestImplementation "io.mockk:mockk-android:$mockkVersion"
|
2023-02-23 05:13:54 +03:00
|
|
|
androidTestImplementation 'androidx.arch.core:core-testing:2.2.0'
|
2022-03-11 13:10:51 +03:00
|
|
|
androidTestImplementation "com.facebook.testing.screenshot:core:0.15.0"
|
|
|
|
|
|
|
|
// UIAutomator - for cross-app UI tests, and to grant screen is turned on in Espresso tests
|
|
|
|
// androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
|
|
|
|
// fix conflict in dependencies; see http://g.co/androidstudio/app-test-app-conflict for details
|
|
|
|
//androidTestImplementation "com.android.support:support-annotations:${supportLibraryVersion}"
|
|
|
|
androidTestImplementation 'tools.fastlane:screengrab:2.1.1'
|
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
|
|
|
|
|
|
implementation "com.github.stateless4j:stateless4j:2.6.0"
|
|
|
|
|
|
|
|
// upon each update first test: new registration, receive push
|
2024-02-23 10:12:48 +03:00
|
|
|
gplayImplementation "com.google.firebase:firebase-messaging:23.4.1"
|
2023-05-15 04:58:56 +03:00
|
|
|
gplayImplementation 'com.google.android.play:review-ktx:2.0.1'
|
2022-09-06 19:14:36 +03:00
|
|
|
|
2024-03-04 18:29:47 +03:00
|
|
|
implementation 'com.github.nextcloud.android-common:ui:0.17.0'
|
2022-11-03 00:32:38 +03:00
|
|
|
|
|
|
|
implementation "androidx.room:room-runtime:$roomVersion"
|
2023-08-29 10:08:39 +03:00
|
|
|
ksp "androidx.room:room-compiler:$roomVersion"
|
2023-01-24 13:21:01 +03:00
|
|
|
androidTestImplementation "androidx.room:room-testing:$roomVersion"
|
2022-11-03 00:32:38 +03:00
|
|
|
|
2024-02-25 12:57:39 +03:00
|
|
|
implementation "io.coil-kt:coil:2.6.0"
|
2023-04-04 19:22:02 +03:00
|
|
|
|
2023-09-05 14:33:39 +03:00
|
|
|
// splash screen dependency ref: https://developer.android.com/develop/ui/views/launch/splash-screen/migrate
|
2023-06-09 04:57:15 +03:00
|
|
|
implementation 'androidx.core:core-splashscreen:1.0.1'
|
2022-03-11 13:10:51 +03:00
|
|
|
}
|
|
|
|
|
2023-08-29 10:08:39 +03:00
|
|
|
configurations.configureEach {
|
2022-09-07 14:19:50 +03:00
|
|
|
resolutionStrategy {
|
2022-03-11 13:10:51 +03:00
|
|
|
cacheChangingModulesFor 0, 'seconds'
|
2024-02-04 20:16:41 +03:00
|
|
|
force 'org.objenesis:objenesis:3.3'
|
2022-03-11 13:10:51 +03:00
|
|
|
eachDependency { details ->
|
|
|
|
if ('org.jacoco' == details.requested.group) {
|
|
|
|
details.useVersion "$jacoco_version"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-29 10:08:39 +03:00
|
|
|
tasks.withType(Test).configureEach {
|
2022-03-11 13:10:51 +03:00
|
|
|
// increased logging for tests
|
|
|
|
testLogging {
|
|
|
|
events "passed", "skipped", "failed"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-29 10:08:39 +03:00
|
|
|
android.applicationVariants.configureEach { variant ->
|
2023-09-05 14:33:39 +03:00
|
|
|
variant.outputs.configureEach { output -> outputFileName = "${output.baseName}-${variant.versionCode}.apk"
|
2022-03-11 13:10:51 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-07 18:42:29 +03:00
|
|
|
spotless {
|
|
|
|
kotlin {
|
|
|
|
target "**/*.kt"
|
|
|
|
ktlint()
|
2022-03-11 13:10:51 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
detekt {
|
2023-08-29 10:08:39 +03:00
|
|
|
config.setFrom("detekt.yml")
|
2022-03-11 13:10:51 +03:00
|
|
|
}
|
|
|
|
|
2024-02-22 12:13:22 +03:00
|
|
|
if (shotTest) {
|
|
|
|
shot {
|
|
|
|
showOnlyFailingTestsInReports = ciBuild
|
|
|
|
// CI environment renders some shadows slightly different from local VMs
|
|
|
|
// Add a 0.5% tolerance to account for that
|
|
|
|
tolerance = ciBuild ? 0.5 : 0
|
|
|
|
}
|
2022-03-11 13:10:51 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
jacoco {
|
|
|
|
toolVersion = "$jacoco_version"
|
|
|
|
}
|
|
|
|
|
|
|
|
spotbugs {
|
|
|
|
ignoreFailures = true // should continue checking
|
2024-01-29 14:35:23 +03:00
|
|
|
effort = Effort.MAX
|
|
|
|
reportLevel = Confidence.valueOf('MEDIUM')
|
2022-03-11 13:10:51 +03:00
|
|
|
}
|
|
|
|
|
2024-03-01 13:22:38 +03:00
|
|
|
tasks.withType(SpotBugsTask){task ->
|
2022-03-11 13:10:51 +03:00
|
|
|
String variantNameCap = task.name.replace("spotbugs", "")
|
|
|
|
String variantName = variantNameCap.substring(0, 1).toLowerCase() + variantNameCap.substring(1)
|
|
|
|
dependsOn "compile${variantNameCap}Sources"
|
|
|
|
|
2024-03-01 13:49:37 +03:00
|
|
|
classes = fileTree("$project.buildDir/intermediates/javac/${variantName}/compile${variantNameCap}JavaWithJavac/classes/")
|
2024-03-01 13:55:51 +03:00
|
|
|
excludeFilter = file("${project.rootDir}/scripts/analysis/spotbugs-filter.xml")
|
2022-03-11 13:10:51 +03:00
|
|
|
reports {
|
2022-03-24 11:03:00 +03:00
|
|
|
xml {
|
2022-03-24 13:20:33 +03:00
|
|
|
required = true
|
2022-03-24 11:03:00 +03:00
|
|
|
}
|
2022-03-11 13:10:51 +03:00
|
|
|
html {
|
2022-03-24 11:03:00 +03:00
|
|
|
required = true
|
|
|
|
outputLocation = file("$project.buildDir/reports/spotbugs/spotbugs.html")
|
|
|
|
stylesheet = 'fancy.xsl'
|
2022-03-11 13:10:51 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-08-29 10:08:39 +03:00
|
|
|
|
|
|
|
ksp {
|
|
|
|
arg('room.schemaLocation', "$projectDir/schemas")
|
|
|
|
}
|