2019-04-24 09:32:19 +03:00
|
|
|
/*
|
|
|
|
* Nextcloud Talk application
|
|
|
|
*
|
|
|
|
* @author Mario Danic
|
|
|
|
* Copyright (C) 2017-2019 Mario Danic <mario@lovelyhq.com>
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2017-10-23 13:40:38 +03:00
|
|
|
apply plugin: 'com.android.application'
|
2017-10-28 00:10:06 +03:00
|
|
|
apply plugin: 'kotlin-android'
|
2018-09-07 14:11:47 +03:00
|
|
|
apply plugin: 'findbugs'
|
2019-04-24 09:32:19 +03:00
|
|
|
apply plugin: 'kotlin-kapt'
|
2019-09-30 15:15:01 +03:00
|
|
|
apply plugin: 'kotlin-android-extensions'
|
2021-04-22 15:31:33 +03:00
|
|
|
apply plugin: 'io.gitlab.arturbosch.detekt'
|
|
|
|
|
|
|
|
configurations {
|
|
|
|
ktlint
|
|
|
|
}
|
2017-10-24 01:00:43 +03:00
|
|
|
|
2018-09-07 14:11:47 +03:00
|
|
|
def taskRequest = getGradle().getStartParameter().getTaskRequests().toString()
|
|
|
|
if (taskRequest.contains("Gplay") || taskRequest.contains("findbugs") || taskRequest.contains("lint")) {
|
2018-02-19 04:14:21 +03:00
|
|
|
apply from: 'gplay.gradle'
|
|
|
|
}
|
2017-10-23 13:40:38 +03:00
|
|
|
|
|
|
|
android {
|
2020-11-16 18:20:56 +03:00
|
|
|
compileSdkVersion 29
|
2020-02-05 17:57:41 +03:00
|
|
|
buildToolsVersion '28.0.3'
|
2017-10-23 13:40:38 +03:00
|
|
|
defaultConfig {
|
|
|
|
minSdkVersion 21
|
2020-11-16 18:20:56 +03:00
|
|
|
targetSdkVersion 29
|
2018-10-02 23:34:00 +03:00
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
2017-10-23 13:40:38 +03:00
|
|
|
|
2021-02-19 12:41:01 +03:00
|
|
|
// mayor.minor.hotfix.increment (for increment: 1-50=Alpha / 51-89=RC / 90-99=stable)
|
|
|
|
// xx .xxx .xx .xx
|
2021-04-26 06:09:39 +03:00
|
|
|
versionCode 120000008
|
|
|
|
versionName "12.0.0 Alpha 08"
|
2018-02-19 04:14:21 +03:00
|
|
|
|
|
|
|
flavorDimensions "default"
|
2018-07-10 15:34:35 +03:00
|
|
|
renderscriptTargetApi 19
|
|
|
|
renderscriptSupportModeEnabled true
|
2017-12-13 01:31:41 +03:00
|
|
|
|
2018-02-19 04:14:21 +03:00
|
|
|
productFlavors {
|
|
|
|
// used for f-droid
|
2021-04-22 12:44:09 +03:00
|
|
|
generic {
|
|
|
|
applicationId 'com.nextcloud.talk2'
|
|
|
|
dimension "default"
|
|
|
|
}
|
|
|
|
gplay {
|
|
|
|
applicationId 'com.nextcloud.talk2'
|
|
|
|
dimension "default"
|
|
|
|
}
|
|
|
|
qa {
|
|
|
|
applicationId "com.nextcloud.talk2.qa"
|
|
|
|
dimension "default"
|
|
|
|
versionCode 1
|
|
|
|
versionName "1"
|
|
|
|
}
|
2018-02-19 04:14:21 +03:00
|
|
|
}
|
2019-01-13 23:57:26 +03:00
|
|
|
|
2017-10-23 13:40:38 +03:00
|
|
|
// Enabling multidex support.
|
|
|
|
multiDexEnabled true
|
|
|
|
|
|
|
|
vectorDrawables.useSupportLibrary = true
|
|
|
|
|
|
|
|
lintOptions {
|
|
|
|
disable 'InvalidPackage'
|
2017-12-19 19:49:29 +03:00
|
|
|
disable 'MissingTranslation'
|
2021-03-22 18:57:30 +03:00
|
|
|
disable 'VectorPath'
|
2017-10-23 13:40:38 +03:00
|
|
|
}
|
2019-07-29 17:43:20 +03:00
|
|
|
|
|
|
|
javaCompileOptions {
|
|
|
|
annotationProcessorOptions {
|
|
|
|
arguments = [
|
|
|
|
parcelerStacktrace: "true"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
2017-10-23 13:40:38 +03:00
|
|
|
}
|
|
|
|
|
2018-10-03 15:11:10 +03:00
|
|
|
dexOptions {
|
|
|
|
javaMaxHeapSize "4g"
|
|
|
|
}
|
|
|
|
|
2017-10-23 13:40:38 +03:00
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
packagingOptions {
|
2021-04-22 12:44:09 +03:00
|
|
|
exclude 'META-INF/LICENSE.txt'
|
2017-10-23 13:40:38 +03:00
|
|
|
exclude 'META-INF/LICENSE'
|
|
|
|
exclude 'META-INF/NOTICE'
|
|
|
|
exclude 'META-INF/rxjava.properties'
|
|
|
|
}
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
|
|
|
|
2018-03-07 12:14:20 +03:00
|
|
|
lintOptions {
|
|
|
|
abortOnError false
|
|
|
|
htmlReport true
|
|
|
|
htmlOutput file("$project.buildDir/reports/lint/lint.html")
|
|
|
|
disable 'MissingTranslation'
|
|
|
|
}
|
2018-09-07 14:11:47 +03:00
|
|
|
|
|
|
|
task findbugs(type: FindBugs) {
|
|
|
|
ignoreFailures = false
|
|
|
|
effort = "max"
|
|
|
|
reportLevel = "medium"
|
2021-01-22 15:57:44 +03:00
|
|
|
classes = fileTree("${project.rootDir}/app/build/intermediates/javac/gplayDebug/classes/com/nextcloud/")
|
2018-09-07 14:11:47 +03:00
|
|
|
excludeFilter = file("${project.rootDir}/findbugs-filter.xml")
|
|
|
|
source = fileTree('src/main/java')
|
|
|
|
pluginClasspath = project.configurations.findbugsPlugins
|
|
|
|
classpath = files()
|
|
|
|
include '**/*.java'
|
|
|
|
exclude '**/gen/**'
|
|
|
|
|
|
|
|
reports {
|
|
|
|
xml.enabled = false
|
|
|
|
html.enabled = true
|
|
|
|
html {
|
|
|
|
destination = file("$project.buildDir/reports/findbugs/findbugs.html")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-10-23 13:40:38 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
ext {
|
2021-04-27 16:31:45 +03:00
|
|
|
butterknifeVersion = "10.2.3"
|
2021-04-19 06:11:00 +03:00
|
|
|
coilKtVersion = "1.2.0"
|
2021-04-14 10:39:13 +03:00
|
|
|
daggerVersion = "2.34.1"
|
2021-04-27 16:31:45 +03:00
|
|
|
okhttpVersion = "3.14.2"
|
|
|
|
lombokVersion = "1.18.10"
|
2021-04-20 01:49:42 +03:00
|
|
|
parcelerVersion = "1.1.13"
|
2021-04-14 10:45:46 +03:00
|
|
|
powermockVersion = "2.0.9"
|
2021-04-27 16:31:45 +03:00
|
|
|
retrofit2Version = "2.7.1"
|
2021-04-05 23:18:10 +03:00
|
|
|
workVersion = "2.3.0"
|
|
|
|
markwonVersion = "4.6.2"
|
2017-10-23 13:40:38 +03:00
|
|
|
}
|
|
|
|
|
2017-11-06 22:01:53 +03:00
|
|
|
|
|
|
|
configurations.all {
|
2018-02-08 16:19:43 +03:00
|
|
|
exclude group: 'com.google.firebase', module: 'firebase-core'
|
2019-02-17 15:28:30 +03:00
|
|
|
exclude group: 'com.google.firebase', module: 'firebase-analytics'
|
|
|
|
exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
|
2017-11-06 22:01:53 +03:00
|
|
|
}
|
|
|
|
|
2019-04-24 09:32:19 +03:00
|
|
|
|
2017-10-23 13:40:38 +03:00
|
|
|
dependencies {
|
2019-04-24 09:32:19 +03:00
|
|
|
implementation fileTree(include: ['*'], dir: 'libs')
|
2021-04-14 00:58:20 +03:00
|
|
|
implementation 'androidx.appcompat:appcompat:1.2.0'
|
2021-02-05 05:04:49 +03:00
|
|
|
implementation 'com.google.android.material:material:1.3.0'
|
2021-04-14 00:58:20 +03:00
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
2019-05-30 21:56:11 +03:00
|
|
|
implementation 'com.github.vanniktech:Emoji:0.6.0'
|
2021-04-14 00:58:20 +03:00
|
|
|
implementation group: 'androidx.emoji', name: 'emoji-bundled', version: '1.1.0'
|
2018-12-12 18:54:10 +03:00
|
|
|
implementation 'org.michaelevans.colorart:library:0.0.3'
|
2021-04-05 23:18:10 +03:00
|
|
|
implementation "androidx.work:work-runtime:${workVersion}"
|
|
|
|
implementation "androidx.work:work-rxjava2:${workVersion}"
|
|
|
|
androidTestImplementation "androidx.work:work-testing:${workVersion}"
|
2021-04-14 00:58:20 +03:00
|
|
|
implementation 'com.google.android:flexbox:1.1.1'
|
2021-02-24 23:28:30 +03:00
|
|
|
implementation ('com.gitlab.bitfireAT:dav4jvm:f2078bc846', {
|
2019-04-24 09:32:19 +03:00
|
|
|
exclude group: 'org.ogce', module: 'xpp3' // Android comes with its own XmlPullParser
|
|
|
|
})
|
2021-04-22 15:31:33 +03:00
|
|
|
ktlint "com.pinterest:ktlint:0.41.0"
|
2021-02-24 19:59:30 +03:00
|
|
|
implementation 'org.conscrypt:conscrypt-android:2.5.1'
|
2019-05-31 11:21:14 +03:00
|
|
|
|
2019-04-24 09:32:19 +03:00
|
|
|
|
2021-02-10 18:48:31 +03:00
|
|
|
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
2019-01-07 01:29:01 +03:00
|
|
|
|
2020-01-13 11:49:51 +03:00
|
|
|
implementation 'androidx.biometric:biometric:1.0.1'
|
|
|
|
implementation "androidx.lifecycle:lifecycle-extensions:2.1.0"
|
2017-11-30 00:40:29 +03:00
|
|
|
|
2019-04-09 22:18:02 +03:00
|
|
|
implementation 'androidx.multidex:multidex:2.0.1'
|
2017-10-23 13:40:38 +03:00
|
|
|
|
2019-03-06 15:55:26 +03:00
|
|
|
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
2019-08-07 13:29:03 +03:00
|
|
|
implementation "io.reactivex.rxjava2:rxjava:2.2.11"
|
2017-10-23 13:40:38 +03:00
|
|
|
|
2018-10-01 14:10:46 +03:00
|
|
|
implementation 'com.bluelinelabs:conductor:2.1.5'
|
|
|
|
implementation 'com.bluelinelabs:conductor-support:2.1.5'
|
2017-10-23 13:40:38 +03:00
|
|
|
|
2021-04-27 16:31:45 +03:00
|
|
|
implementation "com.squareup.okhttp3:okhttp:${okhttpVersion}"
|
|
|
|
implementation "com.squareup.okhttp3:okhttp-urlconnection:${okhttpVersion}"
|
|
|
|
implementation "com.squareup.okhttp3:logging-interceptor:${okhttpVersion}"
|
2017-10-23 13:40:38 +03:00
|
|
|
|
|
|
|
implementation 'com.bluelinelabs:logansquare:1.3.7'
|
2021-04-23 11:49:02 +03:00
|
|
|
implementation 'com.fasterxml.jackson.core:jackson-core:2.12.3'
|
2019-04-24 09:32:19 +03:00
|
|
|
kapt 'com.bluelinelabs:logansquare-compiler:1.3.7'
|
2017-10-23 13:40:38 +03:00
|
|
|
|
2021-04-27 16:31:45 +03:00
|
|
|
implementation "com.squareup.retrofit2:retrofit:${retrofit2Version}"
|
|
|
|
implementation "com.squareup.retrofit2:adapter-rxjava2:${retrofit2Version}"
|
2017-10-23 13:40:38 +03:00
|
|
|
implementation 'com.github.aurae.retrofit2:converter-logansquare:1.4.1'
|
|
|
|
|
2021-04-14 10:39:13 +03:00
|
|
|
implementation "com.google.dagger:dagger:$daggerVersion"
|
|
|
|
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
|
2017-10-23 13:40:38 +03:00
|
|
|
implementation 'com.github.lukaspili.autodagger2:autodagger2:1.1'
|
2019-04-24 09:32:19 +03:00
|
|
|
kapt 'com.github.lukaspili.autodagger2:autodagger2-compiler:1.1'
|
2021-04-23 11:09:10 +03:00
|
|
|
compileOnly 'javax.annotation:javax.annotation-api:1.3.2'
|
2019-04-24 09:32:19 +03:00
|
|
|
// Android only
|
2018-10-01 14:10:46 +03:00
|
|
|
implementation 'org.greenrobot:eventbus:3.1.1'
|
2019-05-31 11:21:14 +03:00
|
|
|
implementation 'io.requery:requery:1.5.1'
|
2021-02-24 20:15:08 +03:00
|
|
|
implementation 'io.requery:requery-android:1.6.1'
|
2019-03-10 00:20:58 +03:00
|
|
|
implementation 'net.zetetic:android-database-sqlcipher:3.5.9'
|
2021-02-10 19:39:20 +03:00
|
|
|
kapt 'io.requery:requery-processor:1.6.1'
|
2021-04-20 01:49:42 +03:00
|
|
|
implementation "org.parceler:parceler-api:$parcelerVersion"
|
|
|
|
kapt "org.parceler:parceler:$parcelerVersion"
|
2017-11-06 22:01:53 +03:00
|
|
|
implementation 'net.orange-box.storebox:storebox-lib:1.4.0'
|
2021-04-27 16:31:45 +03:00
|
|
|
compileOnly "org.projectlombok:lombok:${lombokVersion}"
|
|
|
|
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
|
|
|
|
implementation "com.jakewharton:butterknife:${butterknifeVersion}"
|
|
|
|
kapt "com.jakewharton:butterknife-compiler:${butterknifeVersion}"
|
2019-06-21 11:04:43 +03:00
|
|
|
implementation 'com.github.HITGIF:TextFieldBoxes:1.4.5'
|
2018-10-01 14:10:46 +03:00
|
|
|
implementation 'eu.davidea:flexible-adapter:5.1.0'
|
|
|
|
implementation 'eu.davidea:flexible-adapter-ui:1.0.0'
|
2021-02-09 14:13:06 +03:00
|
|
|
implementation 'org.webrtc:google-webrtc:1.0.32006'
|
2017-10-28 00:10:06 +03:00
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
|
2021-04-22 22:54:48 +03:00
|
|
|
implementation 'com.yarolegovich:lovely-dialog:1.1.1'
|
|
|
|
implementation 'com.yarolegovich:mp:1.1.6'
|
2019-03-06 15:55:26 +03:00
|
|
|
implementation 'me.zhanghai.android.effortlesspermissions:library:1.1.0'
|
2021-02-24 19:31:41 +03:00
|
|
|
implementation 'org.apache.commons:commons-lang3:3.11'
|
2018-10-01 14:10:46 +03:00
|
|
|
implementation 'com.github.wooplr:Spotlight:1.3'
|
2021-04-23 17:06:44 +03:00
|
|
|
implementation 'com.google.code.findbugs:jsr305:3.0.2'
|
2019-12-26 20:48:06 +03:00
|
|
|
implementation('com.github.mario:chatkit:c6a61767291ddb212a2f4f792a2b6aaf295e69a5', {
|
2019-04-24 09:32:19 +03:00
|
|
|
exclude group: 'com.facebook.fresco'
|
|
|
|
})
|
2018-03-12 00:04:41 +03:00
|
|
|
|
2019-08-21 12:24:22 +03:00
|
|
|
implementation 'com.github.mario.fresco:fresco:111'
|
|
|
|
implementation 'com.github.mario.fresco:animated-webp:111'
|
|
|
|
implementation 'com.github.mario.fresco:webpsupport:111'
|
|
|
|
implementation 'com.github.mario.fresco:animated-gif:111'
|
|
|
|
implementation 'com.github.mario.fresco:imagepipeline-okhttp3:111'
|
2021-04-23 11:49:02 +03:00
|
|
|
implementation 'joda-time:joda-time:2.10.10'
|
2021-04-21 23:57:01 +03:00
|
|
|
implementation "io.coil-kt:coil:${coilKtVersion}"
|
2021-04-19 06:11:00 +03:00
|
|
|
implementation "io.coil-kt:coil-gif:${coilKtVersion}"
|
|
|
|
implementation "io.coil-kt:coil-svg:${coilKtVersion}"
|
2019-01-29 05:36:55 +03:00
|
|
|
implementation 'com.github.natario1:Autocomplete:v1.1.0'
|
2018-04-23 16:57:48 +03:00
|
|
|
|
2019-08-09 18:58:54 +03:00
|
|
|
implementation 'com.github.cotechde.hwsecurity:hwsecurity-fido:2.4.5'
|
2019-08-03 14:39:49 +03:00
|
|
|
|
2019-06-06 20:05:22 +03:00
|
|
|
implementation 'com.novoda:merlin:1.2.1'
|
2019-05-29 16:16:44 +03:00
|
|
|
|
2018-10-01 14:10:46 +03:00
|
|
|
implementation 'com.github.Kennyc1012:BottomSheet:2.4.1'
|
2018-10-03 09:19:41 +03:00
|
|
|
implementation 'com.github.mario:PopupBubble:a365177d96'
|
2018-05-28 22:50:38 +03:00
|
|
|
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
|
2019-04-24 09:32:19 +03:00
|
|
|
implementation 'eu.medsea.mimeutil:mime-util:2.1.3'
|
2019-08-30 13:12:40 +03:00
|
|
|
|
|
|
|
implementation 'com.afollestad.material-dialogs:core:3.1.0'
|
2021-04-21 15:36:49 +03:00
|
|
|
implementation 'com.afollestad.material-dialogs:datetime:3.3.0'
|
2019-08-30 13:12:40 +03:00
|
|
|
implementation 'com.afollestad.material-dialogs:bottomsheets:3.1.0'
|
|
|
|
implementation 'com.afollestad.material-dialogs:lifecycle:3.1.0'
|
|
|
|
|
2020-11-12 14:43:17 +03:00
|
|
|
implementation 'com.google.code.gson:gson:2.8.6'
|
2021-04-05 23:18:10 +03:00
|
|
|
implementation 'com.google.android.exoplayer:exoplayer:2.13.3'
|
|
|
|
|
|
|
|
implementation 'com.github.chrisbanes:PhotoView:2.0.0'
|
|
|
|
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.23'
|
|
|
|
|
|
|
|
implementation "io.noties.markwon:core:$markwonVersion"
|
2020-11-12 14:43:17 +03:00
|
|
|
|
2021-03-22 18:57:30 +03:00
|
|
|
//implementation 'com.github.dhaval2404:imagepicker:1.8'
|
|
|
|
implementation 'com.github.tobiaskaminsky:ImagePicker:extraFile-SNAPSHOT'
|
|
|
|
implementation 'com.elyeproj.libraries:loaderviewlibrary:2.0.0'
|
|
|
|
|
2020-01-13 11:49:51 +03:00
|
|
|
testImplementation 'junit:junit:4.13'
|
2021-04-27 16:31:45 +03:00
|
|
|
testImplementation 'org.mockito:mockito-core:3.9.0'
|
2021-04-14 10:45:46 +03:00
|
|
|
testImplementation "org.powermock:powermock-core:${powermockVersion}"
|
|
|
|
testImplementation "org.powermock:powermock-module-junit4:${powermockVersion}"
|
|
|
|
testImplementation "org.powermock:powermock-api-mockito2:${powermockVersion}"
|
2019-04-11 19:59:14 +03:00
|
|
|
|
2018-10-02 23:34:00 +03:00
|
|
|
androidTestImplementation ('androidx.test.espresso:espresso-core:3.1.0-alpha4', {
|
2017-10-23 13:40:38 +03:00
|
|
|
exclude group: 'com.android.support', module: 'support-annotations'
|
|
|
|
})
|
2021-02-24 23:57:14 +03:00
|
|
|
findbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.11.0'
|
2019-08-07 13:29:03 +03:00
|
|
|
findbugsPlugins 'com.mebigfatguy.fb-contrib:fb-contrib:7.4.6'
|
2017-10-23 13:40:38 +03:00
|
|
|
}
|
2019-12-26 20:48:06 +03:00
|
|
|
|
2021-04-22 15:31:33 +03:00
|
|
|
task ktlint(type: JavaExec, group: "verification") {
|
|
|
|
description = "Check Kotlin code style."
|
|
|
|
main = "com.pinterest.ktlint.Main"
|
|
|
|
classpath = configurations.ktlint
|
|
|
|
args "--reporter=plain", "--reporter=plain,output=${buildDir}/ktlint.txt,src/**/*.kt"
|
|
|
|
}
|
|
|
|
|
|
|
|
task ktlintFormat(type: JavaExec, group: "formatting") {
|
|
|
|
description = "Fix Kotlin code style deviations."
|
|
|
|
main = "com.pinterest.ktlint.Main"
|
|
|
|
classpath = configurations.ktlint
|
|
|
|
args "-F", "src/**/*.kt"
|
|
|
|
}
|
|
|
|
|
|
|
|
detekt {
|
|
|
|
reports {
|
|
|
|
xml {
|
|
|
|
enabled = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
config = files("../detekt.yml")
|
|
|
|
input = files("src/")
|
|
|
|
}
|
|
|
|
|
2019-12-26 20:48:06 +03:00
|
|
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = "1.8"
|
|
|
|
}
|
2020-09-29 10:44:31 +03:00
|
|
|
}
|