2017-01-03 10:30:27 +11:00
|
|
|
apply plugin: 'com.android.application'
|
2017-11-06 08:32:36 +11:00
|
|
|
apply plugin: 'kotlin-android'
|
2018-09-01 04:35:30 +10:00
|
|
|
apply plugin: 'kotlin-kapt'
|
2021-03-21 22:42:28 +11:00
|
|
|
apply plugin: 'kotlin-parcelize'
|
2017-01-03 10:30:27 +11:00
|
|
|
|
2019-10-30 06:30:46 +11:00
|
|
|
apply from: "../instance-build.gradle"
|
|
|
|
|
2019-11-07 06:48:58 +11:00
|
|
|
def getGitSha = {
|
2018-07-17 03:01:34 +10:00
|
|
|
def stdout = new ByteArrayOutputStream()
|
2022-05-12 01:16:51 +10:00
|
|
|
try {
|
|
|
|
exec {
|
|
|
|
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
|
|
|
standardOutput = stdout
|
|
|
|
}
|
|
|
|
} catch (Exception e) {
|
|
|
|
return "unknown"
|
2018-07-17 03:01:34 +10:00
|
|
|
}
|
|
|
|
return stdout.toString().trim()
|
|
|
|
}
|
|
|
|
|
2017-01-03 10:30:27 +11:00
|
|
|
android {
|
2022-11-05 05:22:38 +11:00
|
|
|
compileSdkVersion 33
|
2017-01-03 10:30:27 +11:00
|
|
|
defaultConfig {
|
2019-10-30 06:30:46 +11:00
|
|
|
applicationId APP_ID
|
2022-12-07 06:32:26 +11:00
|
|
|
namespace "com.keylesspalace.tusky"
|
2022-08-05 00:48:26 +10:00
|
|
|
minSdkVersion 23
|
2022-11-05 05:22:38 +11:00
|
|
|
targetSdkVersion 33
|
2022-12-01 06:01:33 +11:00
|
|
|
versionCode 97
|
|
|
|
versionName "20.0"
|
2018-12-18 01:25:35 +11:00
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
2018-09-26 03:04:57 +10:00
|
|
|
vectorDrawables.useSupportLibrary = true
|
2018-12-26 06:06:28 +11:00
|
|
|
|
2019-10-30 06:30:46 +11:00
|
|
|
resValue "string", "app_name", APP_NAME
|
|
|
|
|
|
|
|
buildConfigField("String", "CUSTOM_LOGO_URL", "\"$CUSTOM_LOGO_URL\"")
|
|
|
|
buildConfigField("String", "CUSTOM_INSTANCE", "\"$CUSTOM_INSTANCE\"")
|
|
|
|
buildConfigField("String", "SUPPORT_ACCOUNT_URL", "\"$SUPPORT_ACCOUNT_URL\"")
|
|
|
|
|
2018-12-26 06:06:28 +11:00
|
|
|
kapt {
|
|
|
|
arguments {
|
|
|
|
arg("room.schemaLocation", "$projectDir/schemas")
|
|
|
|
}
|
|
|
|
}
|
2017-01-03 10:30:27 +11:00
|
|
|
}
|
|
|
|
buildTypes {
|
|
|
|
release {
|
2017-04-08 08:08:51 +10:00
|
|
|
minifyEnabled true
|
|
|
|
shrinkResources true
|
2018-08-16 04:46:37 +10:00
|
|
|
proguardFiles 'proguard-rules.pro'
|
2017-01-03 10:30:27 +11:00
|
|
|
}
|
2019-06-10 00:55:34 +10:00
|
|
|
debug {}
|
2018-07-17 03:01:34 +10:00
|
|
|
}
|
|
|
|
|
|
|
|
flavorDimensions "color"
|
|
|
|
productFlavors {
|
2019-06-10 00:55:34 +10:00
|
|
|
blue {}
|
2018-07-17 03:01:34 +10:00
|
|
|
green {
|
2020-11-29 03:34:21 +11:00
|
|
|
resValue "string", "app_name", APP_NAME + " Test"
|
2017-12-08 22:15:46 +11:00
|
|
|
applicationIdSuffix ".test"
|
2019-06-10 00:55:34 +10:00
|
|
|
versionNameSuffix "-" + getGitSha()
|
2017-12-08 22:15:46 +11:00
|
|
|
}
|
2017-01-03 10:30:27 +11:00
|
|
|
}
|
2017-10-26 06:56:27 +11:00
|
|
|
|
2017-04-13 14:01:02 +10:00
|
|
|
lintOptions {
|
|
|
|
disable 'MissingTranslation'
|
|
|
|
}
|
2021-01-22 04:57:09 +11:00
|
|
|
buildFeatures {
|
|
|
|
viewBinding true
|
|
|
|
}
|
2018-03-10 08:02:32 +11:00
|
|
|
testOptions {
|
|
|
|
unitTests {
|
2019-09-22 16:18:44 +10:00
|
|
|
returnDefaultValues = true
|
2018-03-10 08:02:32 +11:00
|
|
|
includeAndroidResources = true
|
|
|
|
}
|
2023-01-13 05:10:11 +11:00
|
|
|
unitTests.all {
|
|
|
|
systemProperty 'robolectric.logging.enabled', 'true'
|
|
|
|
}
|
2018-03-10 08:02:32 +11:00
|
|
|
}
|
2018-12-26 06:06:28 +11:00
|
|
|
sourceSets {
|
|
|
|
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
|
|
|
|
}
|
|
|
|
|
2018-12-18 05:08:32 +11:00
|
|
|
packagingOptions {
|
|
|
|
// Exclude unneeded files added by libraries
|
|
|
|
exclude 'LICENSE_OFL'
|
|
|
|
exclude 'LICENSE_UNICODE'
|
|
|
|
}
|
2019-03-30 05:56:53 +11:00
|
|
|
bundle {
|
|
|
|
language {
|
|
|
|
// bundle all languages in every apk so the dynamic language switching works
|
|
|
|
enableSplit = false
|
|
|
|
}
|
|
|
|
}
|
2022-01-21 07:10:32 +11:00
|
|
|
kotlinOptions {
|
|
|
|
freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
|
|
|
|
}
|
2022-12-06 05:13:15 +11:00
|
|
|
dependenciesInfo {
|
|
|
|
includeInApk false
|
|
|
|
includeInBundle false
|
|
|
|
}
|
2019-05-18 16:06:30 +10:00
|
|
|
}
|
|
|
|
|
2022-11-05 06:10:26 +11:00
|
|
|
// library versions are in PROJECT_ROOT/gradle/libs.versions.toml
|
2017-01-03 10:30:27 +11:00
|
|
|
dependencies {
|
2022-11-05 06:10:26 +11:00
|
|
|
implementation libs.kotlinx.coroutines.android
|
|
|
|
implementation libs.kotlinx.coroutines.rx3
|
|
|
|
|
|
|
|
implementation libs.bundles.androidx
|
|
|
|
implementation libs.bundles.room
|
|
|
|
kapt libs.androidx.room.compiler
|
|
|
|
|
|
|
|
implementation libs.android.material
|
|
|
|
|
|
|
|
implementation libs.gson
|
|
|
|
|
|
|
|
implementation libs.bundles.retrofit
|
|
|
|
implementation libs.networkresult.calladapter
|
|
|
|
|
|
|
|
implementation libs.bundles.okhttp
|
|
|
|
|
|
|
|
implementation libs.conscrypt.android
|
|
|
|
|
|
|
|
implementation libs.bundles.glide
|
|
|
|
kapt libs.glide.compiler
|
|
|
|
|
|
|
|
implementation libs.bundles.rxjava3
|
|
|
|
|
|
|
|
implementation libs.bundles.autodispose
|
|
|
|
|
|
|
|
implementation libs.bundles.dagger
|
|
|
|
kapt libs.bundles.dagger.processors
|
|
|
|
|
|
|
|
implementation libs.sparkbutton
|
|
|
|
|
|
|
|
implementation libs.photoview
|
|
|
|
|
|
|
|
implementation libs.bundles.material.drawer
|
|
|
|
implementation libs.material.typeface, {
|
|
|
|
artifact {
|
|
|
|
type = "aar"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
implementation libs.image.cropper
|
|
|
|
|
|
|
|
implementation libs.bundles.filemojicompat
|
|
|
|
|
|
|
|
implementation libs.bouncycastle
|
|
|
|
implementation libs.unified.push
|
|
|
|
|
|
|
|
testImplementation libs.androidx.test.junit
|
|
|
|
testImplementation libs.robolectric
|
|
|
|
testImplementation libs.bundles.mockito
|
|
|
|
testImplementation libs.mockwebserver
|
|
|
|
testImplementation libs.androidx.core.testing
|
|
|
|
testImplementation libs.kotlinx.coroutines.test
|
2022-11-08 06:04:07 +11:00
|
|
|
testImplementation libs.androidx.work.testing
|
2022-11-05 06:10:26 +11:00
|
|
|
|
|
|
|
androidTestImplementation libs.espresso.core
|
|
|
|
androidTestImplementation libs.androidx.room.testing
|
|
|
|
androidTestImplementation libs.androidx.test.junit
|
|
|
|
|
2017-11-06 08:32:36 +11:00
|
|
|
}
|