0
0
mirror of https://github.com/thunderbird/thunderbird-android.git synced 2024-09-20 04:02:14 +02:00
thunderbird-android/build.gradle

127 lines
4.3 KiB
Groovy
Raw Normal View History

import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
2013-05-25 23:14:46 +02:00
buildscript {
ext {
buildConfig = [
'compileSdk': 33,
2022-02-12 23:40:14 +01:00
'targetSdk': 31,
2019-11-19 15:00:08 +01:00
'minSdk': 21,
'buildTools': '32.0.0',
2022-02-15 16:37:51 +01:00
'robolectricSdk': 31
]
2022-09-05 15:27:05 +02:00
// Judging the impact of newer library versions on the app requires being intimately familiar with the code
// base. Please don't open pull requests upgrading dependencies if you're a new contributor.
versions = [
2022-08-05 14:07:11 +02:00
'kotlin': '1.7.10',
'kotlinCoroutines': '1.6.4',
'jetbrainsAnnotations': '23.0.0',
'androidxAppCompat': '1.5.1',
'androidxActivity': '1.5.1',
'androidxRecyclerView': '1.2.1',
'androidxLifecycle': '2.5.1',
'androidxAnnotation': '1.4.0',
'androidxBiometric': '1.1.0',
'androidxNavigation': '2.5.1',
'androidxConstraintLayout': '2.1.4',
'androidxWorkManager': '2.7.1',
'androidxFragment': '1.5.2',
'androidxLocalBroadcastManager': '1.1.0',
2022-08-05 16:59:16 +02:00
'androidxCore': '1.8.0',
'androidxCardView': '1.0.0',
'androidxPreference': '1.2.0',
'androidxTestCore': '1.4.0',
'materialComponents': '1.6.1',
2022-03-03 21:40:44 +01:00
'fastAdapter': '5.6.0',
2019-11-28 17:26:29 +01:00
'preferencesFix': '1.1.0',
2022-08-05 21:59:43 +02:00
'okio': '3.2.0',
'moshi': '1.13.0',
2021-10-30 03:43:52 +02:00
'timber': '5.0.1',
2022-08-05 23:51:32 +02:00
'koin': '3.2.0',
// We can't upgrade Commons IO beyond this version because starting with 2.7 it is using Java 8 API
// that is not available until Android API 26 (even with desugaring enabled).
// See https://issuetracker.google.com/issues/160484830
'commonsIo': '2.6',
2021-10-30 04:25:44 +02:00
'mime4j': '0.8.6',
2022-08-05 22:27:27 +02:00
'okhttp': '4.10.0',
2022-09-05 02:57:42 +02:00
'minidns': '1.0.4',
2022-08-05 22:28:29 +02:00
'glide': '4.13.2',
2022-09-05 02:57:42 +02:00
'jsoup': '1.15.3',
'httpClient': '4.5.13',
'androidxTestRunner': '1.4.0',
2021-04-22 01:49:06 +02:00
'junit': '4.13.2',
2022-09-05 02:57:42 +02:00
'robolectric': '4.8.2',
'mockito': '4.7.0',
'mockitoKotlin': '4.0.0',
2021-10-30 04:50:40 +02:00
'truth': '1.1.3',
2022-08-05 19:31:39 +02:00
'turbine': '0.9.0',
2022-09-05 02:57:01 +02:00
'ktlint': '0.44.0'
]
javaVersion = JavaVersion.VERSION_1_8
kotlinJvmVersion = "1.8"
}
2014-09-18 15:18:41 +02:00
repositories {
mavenCentral()
2018-02-17 04:05:09 +01:00
google()
maven { url "https://plugins.gradle.org/m2/" }
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 {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
2022-09-05 02:57:01 +02:00
classpath "org.jlleitschuh.gradle:ktlint-gradle:11.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 {
mavenCentral()
2018-02-17 04:33:30 +01:00
google()
2019-10-05 17:19:30 +02:00
maven { url 'https://jitpack.io' }
2018-02-17 04:33:30 +01: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}")
}
}
tasks.withType(Test) {
testLogging {
exceptionFormat "full"
showCauses true
showExceptions true
showStackTraces true
}
}
tasks.withType(KotlinCompile) {
kotlinOptions {
2022-08-09 13:01:50 +02:00
freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
}
}
apply plugin: 'org.jlleitschuh.gradle.ktlint'
ktlint {
version = versions.ktlint
}
2014-08-31 01:10:13 +02:00
}
tasks.register('testsOnCi') {
dependsOn getSubprojects()
.collect { project -> project.tasks.withType(Test) }
.flatten()
.findAll { task -> task.name in ['testDebugUnitTest', 'test'] }
}