2021-05-28 13:26:19 +02:00
|
|
|
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
|
|
|
|
|
2013-05-25 23:14:46 +02:00
|
|
|
buildscript {
|
2018-05-23 15:57:04 +02:00
|
|
|
ext {
|
2018-05-23 19:36:52 +02:00
|
|
|
buildConfig = [
|
2021-10-30 03:17:50 +02:00
|
|
|
'compileSdk': 31,
|
2022-02-12 23:40:14 +01:00
|
|
|
'targetSdk': 31,
|
2019-11-19 15:00:08 +01:00
|
|
|
'minSdk': 21,
|
2022-03-01 19:15:17 +01:00
|
|
|
'buildTools': '32.0.0',
|
2022-02-15 16:37:51 +01:00
|
|
|
'robolectricSdk': 31
|
2018-05-23 19:36:52 +02:00
|
|
|
]
|
2018-05-23 15:57:04 +02:00
|
|
|
|
2018-05-23 19:36:52 +02:00
|
|
|
versions = [
|
2022-03-01 18:45:00 +01:00
|
|
|
'kotlin': '1.6.10',
|
2022-03-01 19:22:19 +01:00
|
|
|
'kotlinCoroutines': '1.6.0',
|
2022-03-03 20:35:01 +01:00
|
|
|
'androidxAppCompat': '1.4.1',
|
2021-10-30 03:17:50 +02:00
|
|
|
'androidxActivity': '1.4.0',
|
2021-10-30 03:33:49 +02:00
|
|
|
'androidxRecyclerView': '1.2.1',
|
2022-03-03 20:35:59 +01:00
|
|
|
'androidxLifecycle': '2.4.1',
|
2022-03-03 20:37:17 +01:00
|
|
|
'androidxAnnotation': '1.3.0',
|
2021-08-17 18:24:58 +02:00
|
|
|
'androidxBiometric': '1.1.0',
|
2022-03-03 20:55:07 +01:00
|
|
|
'androidxNavigation': '2.4.1',
|
2021-10-30 03:36:07 +02:00
|
|
|
'androidxConstraintLayout': '2.1.1',
|
2021-10-30 03:37:41 +02:00
|
|
|
'androidxWorkManager': '2.7.0',
|
2021-10-30 03:17:50 +02:00
|
|
|
'androidxFragment': '1.3.6',
|
2019-11-19 18:32:29 +01:00
|
|
|
'androidxLocalBroadcastManager': '1.0.0',
|
2021-10-30 03:17:50 +02:00
|
|
|
'androidxCore': '1.7.0',
|
2020-04-05 01:01:21 +02:00
|
|
|
'androidxCardView': '1.0.0',
|
2020-04-15 21:32:44 +02:00
|
|
|
'androidxPreference': '1.1.1',
|
2021-10-30 03:38:55 +02:00
|
|
|
'androidxTestCore': '1.4.0',
|
2021-10-30 03:40:34 +02:00
|
|
|
'materialComponents': '1.4.0',
|
2021-10-30 03:41:28 +02:00
|
|
|
'fastAdapter': '5.5.1',
|
2019-11-28 17:26:29 +01:00
|
|
|
'preferencesFix': '1.1.0',
|
2021-04-22 01:25:02 +02:00
|
|
|
'okio': '2.10.0',
|
2022-03-01 18:45:00 +01:00
|
|
|
'moshi': '1.13.0',
|
2021-10-30 03:43:52 +02:00
|
|
|
'timber': '5.0.1',
|
2021-10-30 03:55:09 +02:00
|
|
|
'koin': '3.1.3',
|
2021-11-15 18:06:18 +01:00
|
|
|
'commonsIo': '2.6',
|
2021-10-30 04:25:44 +02:00
|
|
|
'mime4j': '0.8.6',
|
2021-10-30 04:27:51 +02:00
|
|
|
'okhttp': '4.9.2',
|
2020-09-18 02:40:47 +02:00
|
|
|
'minidns': '1.0.0',
|
2021-04-22 01:47:55 +02:00
|
|
|
'glide': '4.12.0',
|
2022-01-26 03:44:15 +01:00
|
|
|
'jsoup': '1.13.1',
|
2019-01-16 13:52:46 +01:00
|
|
|
|
2021-10-30 04:31:13 +02:00
|
|
|
'androidxTestRunner': '1.4.0',
|
2021-04-22 01:49:06 +02:00
|
|
|
'junit': '4.13.2',
|
2022-02-15 16:37:51 +01:00
|
|
|
'robolectric': '4.7.3',
|
2021-10-30 04:49:09 +02:00
|
|
|
'mockito': '4.0.0',
|
|
|
|
'mockitoKotlin': '4.0.0',
|
2021-10-30 04:50:40 +02:00
|
|
|
'truth': '1.1.3',
|
2021-10-30 02:31:37 +02:00
|
|
|
'turbine': '0.7.0',
|
2020-10-16 14:14:12 +02:00
|
|
|
|
2021-04-22 02:06:41 +02:00
|
|
|
'ktlint': '0.40.0'
|
2018-05-23 19:36:52 +02:00
|
|
|
]
|
2019-11-13 16:10:14 +01:00
|
|
|
|
2019-11-13 16:35:38 +01:00
|
|
|
javaVersion = JavaVersion.VERSION_1_8
|
2019-11-17 14:40:57 +01:00
|
|
|
kotlinJvmVersion = "1.8"
|
2018-05-23 15:57:04 +02:00
|
|
|
}
|
|
|
|
|
2014-09-18 15:18:41 +02:00
|
|
|
repositories {
|
2018-10-24 03:29:21 +02:00
|
|
|
mavenCentral()
|
2018-02-17 04:05:09 +01:00
|
|
|
google()
|
2019-11-26 21:37:40 +01:00
|
|
|
maven { url "https://plugins.gradle.org/m2/" }
|
2018-10-24 03:29:21 +02:00
|
|
|
jcenter()
|
2014-09-18 15:18:41 +02:00
|
|
|
}
|
2013-05-25 23:14:46 +02:00
|
|
|
|
2014-09-18 15:18:41 +02:00
|
|
|
dependencies {
|
2022-03-01 18:17:51 +01:00
|
|
|
classpath 'com.android.tools.build:gradle:7.1.2'
|
2018-05-23 19:36:52 +02:00
|
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
|
2021-04-22 02:06:41 +02:00
|
|
|
classpath "org.jlleitschuh.gradle:ktlint-gradle:10.0.0"
|
2014-09-18 15:18:41 +02:00
|
|
|
}
|
2013-05-25 23:14:46 +02:00
|
|
|
}
|
|
|
|
|
2015-12-21 02:11:37 +01:00
|
|
|
project.ext {
|
|
|
|
testCoverage = project.hasProperty('testCoverage')
|
|
|
|
}
|
2014-08-31 01:10:13 +02:00
|
|
|
|
|
|
|
subprojects {
|
2018-02-17 04:33:30 +01:00
|
|
|
repositories {
|
2018-10-24 03:29:21 +02:00
|
|
|
mavenCentral()
|
2018-02-17 04:33:30 +01:00
|
|
|
google()
|
2018-10-24 03:29:21 +02:00
|
|
|
jcenter()
|
2019-10-05 17:19:30 +02:00
|
|
|
maven { url 'https://jitpack.io' }
|
2018-02-17 04:33:30 +01:00
|
|
|
}
|
2020-09-19 21:55:25 +02:00
|
|
|
|
2021-10-30 02:31:37 +02:00
|
|
|
configurations.all {
|
|
|
|
resolutionStrategy.dependencySubstitution {
|
|
|
|
substitute module("androidx.core:core") using module("androidx.core:core:${versions.androidxCore}")
|
|
|
|
substitute module("androidx.activity:activity") using module("androidx.activity:activity:${versions.androidxActivity}")
|
|
|
|
substitute module("androidx.appcompat:appcompat") using module("androidx.appcompat:appcompat:${versions.androidxAppCompat}")
|
|
|
|
substitute module("androidx.preference:preference") using module("androidx.preference:preference:${versions.androidxPreference}")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-09-19 21:55:25 +02:00
|
|
|
tasks.withType(Test) {
|
|
|
|
testLogging {
|
|
|
|
exceptionFormat "full"
|
|
|
|
showCauses true
|
|
|
|
showExceptions true
|
|
|
|
showStackTraces true
|
|
|
|
}
|
|
|
|
}
|
2020-10-16 14:14:12 +02:00
|
|
|
|
2021-05-28 13:26:19 +02:00
|
|
|
tasks.withType(KotlinCompile) {
|
|
|
|
kotlinOptions {
|
|
|
|
freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-10-16 14:14:12 +02:00
|
|
|
apply plugin: 'org.jlleitschuh.gradle.ktlint'
|
|
|
|
ktlint {
|
|
|
|
version = versions.ktlint
|
|
|
|
}
|
2014-08-31 01:10:13 +02:00
|
|
|
}
|
2022-01-28 04:07:22 +01:00
|
|
|
|
|
|
|
tasks.register('testsOnCi') {
|
|
|
|
dependsOn getSubprojects()
|
|
|
|
.collect { project -> project.tasks.withType(Test) }
|
|
|
|
.flatten()
|
|
|
|
.findAll { task -> task.name in ['testDebugUnitTest', 'test'] }
|
|
|
|
}
|