1
0
mirror of https://github.com/tuskyapp/Tusky synced 2025-02-02 14:16:47 +01:00
Tusky-App-Android/app/build.gradle

153 lines
3.9 KiB
Groovy
Raw Normal View History

2023-01-13 15:18:00 +08:00
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.kotlin.parcelize)
}
2017-01-02 18:30:27 -05:00
apply from: "../instance-build.gradle"
2023-01-13 15:22:16 +08:00
final def gitSha = providers.exec {
commandLine('git', 'rev-parse', '--short=7', 'HEAD')
}.standardOutput.asText.get().trim()
2017-01-02 18:30:27 -05:00
android {
2023-01-13 15:20:22 +08:00
compileSdk 33
2023-01-14 03:50:44 +08:00
namespace "com.keylesspalace.tusky"
2017-01-02 18:30:27 -05:00
defaultConfig {
applicationId APP_ID
2023-01-13 15:20:22 +08:00
minSdk 23
targetSdk 33
2022-11-30 20:01:33 +01:00
versionCode 97
versionName "20.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2018-09-25 19:04:57 +02:00
vectorDrawables.useSupportLibrary = true
2018-12-25 20:06:28 +01: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\"")
2017-01-02 18:30:27 -05:00
}
buildTypes {
release {
2017-04-08 00:08:51 +02:00
minifyEnabled true
shrinkResources true
proguardFiles 'proguard-rules.pro'
2017-01-02 18:30:27 -05:00
}
debug {}
}
flavorDimensions "color"
productFlavors {
blue {}
green {
resValue "string", "app_name", APP_NAME + " Test"
applicationIdSuffix ".test"
2023-01-13 15:22:16 +08:00
versionNameSuffix "-" + gitSha
}
2017-01-02 18:30:27 -05:00
}
2023-01-13 15:20:22 +08:00
lint {
disable 'MissingTranslation'
}
buildFeatures {
2023-01-13 15:26:07 +08:00
buildConfig true
resValues true
viewBinding true
}
testOptions {
unitTests {
returnDefaultValues = true
includeAndroidResources = true
}
unitTests.all {
systemProperty 'robolectric.logging.enabled', 'true'
2023-01-13 15:22:16 +08:00
}
}
2018-12-25 20:06:28 +01:00
sourceSets {
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
}
2023-01-13 15:20:22 +08:00
// Exclude unneeded files added by libraries
packagingOptions.resources.excludes += [
'LICENSE_OFL',
2023-01-13 15:22:16 +08:00
'LICENSE_UNICODE',
2023-01-13 15:20:22 +08:00
]
bundle {
language {
// bundle all languages in every apk so the dynamic language switching works
enableSplit = false
}
}
dependenciesInfo {
includeInApk false
includeInBundle false
}
2019-05-18 08:06:30 +02:00
}
2023-01-13 15:20:22 +08:00
kapt {
arguments {
arg("room.schemaLocation", "$projectDir/schemas")
2023-01-14 03:48:29 +08:00
arg("room.incremental", "true")
2023-01-13 15:20:22 +08:00
}
}
// library versions are in PROJECT_ROOT/gradle/libs.versions.toml
2017-01-02 18:30:27 -05:00
dependencies {
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
2023-01-14 03:50:44 +08:00
implementation libs.material.typeface
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
testImplementation libs.androidx.work.testing
androidTestImplementation libs.espresso.core
androidTestImplementation libs.androidx.room.testing
androidTestImplementation libs.androidx.test.junit
2017-11-05 23:32:36 +02:00
}