2023-02-04 19:58:53 +01:00
|
|
|
plugins {
|
|
|
|
alias(libs.plugins.android.application)
|
|
|
|
alias(libs.plugins.kotlin.android)
|
|
|
|
alias(libs.plugins.kotlin.kapt)
|
|
|
|
alias(libs.plugins.kotlin.parcelize)
|
2018-07-16 19:01:34 +02:00
|
|
|
}
|
|
|
|
|
2023-02-16 20:20:52 +01:00
|
|
|
apply from: 'getGitSha.gradle'
|
2023-02-10 21:22:32 +01:00
|
|
|
|
2023-02-16 20:20:52 +01:00
|
|
|
final def gitSha = ext.getGitSha()
|
2023-02-04 19:58:53 +01:00
|
|
|
|
|
|
|
// The app name
|
|
|
|
final def APP_NAME = "Tusky"
|
|
|
|
// The application id. Must be unique, e.g. based on your domain
|
|
|
|
final def APP_ID = "com.keylesspalace.tusky"
|
|
|
|
// url of a custom app logo. Recommended size at least 600x600. Keep empty to use the Tusky elephant friend.
|
|
|
|
final def CUSTOM_LOGO_URL = ""
|
|
|
|
// e.g. mastodon.social. Keep empty to not suggest any instance on the signup screen
|
|
|
|
final def CUSTOM_INSTANCE = ""
|
|
|
|
// link to your support account. Will be linked on the about page when not empty.
|
|
|
|
final def SUPPORT_ACCOUNT_URL = "https://mastodon.social/@Tusky"
|
|
|
|
|
2017-01-03 00:30:27 +01:00
|
|
|
android {
|
2023-02-04 19:58:53 +01:00
|
|
|
compileSdk 33
|
|
|
|
namespace "com.keylesspalace.tusky"
|
2017-01-03 00:30:27 +01:00
|
|
|
defaultConfig {
|
2019-10-29 20:30:46 +01:00
|
|
|
applicationId APP_ID
|
2022-12-06 20:32:26 +01:00
|
|
|
namespace "com.keylesspalace.tusky"
|
2023-02-04 19:58:53 +01:00
|
|
|
minSdk 23
|
|
|
|
targetSdk 33
|
2023-02-03 20:10:46 +01:00
|
|
|
versionCode 100
|
|
|
|
versionName "21.0"
|
2018-12-17 15:25:35 +01:00
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
2018-09-25 19:04:57 +02:00
|
|
|
vectorDrawables.useSupportLibrary = true
|
2018-12-25 20:06:28 +01:00
|
|
|
|
2019-10-29 20:30:46 +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-03 00:30:27 +01:00
|
|
|
}
|
|
|
|
buildTypes {
|
|
|
|
release {
|
2017-04-08 00:08:51 +02:00
|
|
|
minifyEnabled true
|
|
|
|
shrinkResources true
|
2018-08-15 20:46:37 +02:00
|
|
|
proguardFiles 'proguard-rules.pro'
|
2017-01-03 00:30:27 +01:00
|
|
|
}
|
2018-07-16 19:01:34 +02:00
|
|
|
}
|
|
|
|
|
2023-02-04 19:58:53 +01:00
|
|
|
flavorDimensions += "color"
|
2018-07-16 19:01:34 +02:00
|
|
|
productFlavors {
|
2019-06-09 16:55:34 +02:00
|
|
|
blue {}
|
2018-07-16 19:01:34 +02:00
|
|
|
green {
|
2020-11-28 17:34:21 +01:00
|
|
|
resValue "string", "app_name", APP_NAME + " Test"
|
2017-12-08 12:15:46 +01:00
|
|
|
applicationIdSuffix ".test"
|
2023-02-04 19:58:53 +01:00
|
|
|
versionNameSuffix "-" + gitSha
|
2017-12-08 12:15:46 +01:00
|
|
|
}
|
2017-01-03 00:30:27 +01:00
|
|
|
}
|
2017-10-25 21:56:27 +02:00
|
|
|
|
2023-02-04 19:58:53 +01:00
|
|
|
lint {
|
2017-04-13 06:01:02 +02:00
|
|
|
disable 'MissingTranslation'
|
|
|
|
}
|
2021-01-21 18:57:09 +01:00
|
|
|
buildFeatures {
|
2023-02-04 19:58:53 +01:00
|
|
|
buildConfig true
|
|
|
|
resValues true
|
2021-01-21 18:57:09 +01:00
|
|
|
viewBinding true
|
|
|
|
}
|
2018-03-09 22:02:32 +01:00
|
|
|
testOptions {
|
|
|
|
unitTests {
|
2019-09-22 08:18:44 +02:00
|
|
|
returnDefaultValues = true
|
2018-03-09 22:02:32 +01:00
|
|
|
includeAndroidResources = true
|
|
|
|
}
|
2023-01-12 19:10:11 +01:00
|
|
|
unitTests.all {
|
|
|
|
systemProperty 'robolectric.logging.enabled', 'true'
|
2023-02-28 21:28:05 +01:00
|
|
|
systemProperty 'robolectric.lazyload', 'ON'
|
2023-02-04 19:58:53 +01:00
|
|
|
}
|
2018-03-09 22:02:32 +01:00
|
|
|
}
|
2018-12-25 20:06:28 +01:00
|
|
|
sourceSets {
|
|
|
|
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
|
|
|
|
}
|
|
|
|
|
2023-02-04 19:58:53 +01:00
|
|
|
// Exclude unneeded files added by libraries
|
|
|
|
packagingOptions.resources.excludes += [
|
|
|
|
'LICENSE_OFL',
|
|
|
|
'LICENSE_UNICODE',
|
|
|
|
]
|
|
|
|
|
2019-03-29 19:56:53 +01:00
|
|
|
bundle {
|
|
|
|
language {
|
|
|
|
// bundle all languages in every apk so the dynamic language switching works
|
|
|
|
enableSplit = false
|
|
|
|
}
|
|
|
|
}
|
2022-12-05 19:13:15 +01:00
|
|
|
dependenciesInfo {
|
|
|
|
includeInApk false
|
|
|
|
includeInBundle false
|
|
|
|
}
|
2023-02-25 20:59:39 +01:00
|
|
|
// Can remove this once https://issuetracker.google.com/issues/260059413 is fixed.
|
|
|
|
// https://kotlinlang.org/docs/gradle-configure-project.html#gradle-java-toolchains-support
|
2023-02-04 19:58:53 +01:00
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_11
|
|
|
|
targetCompatibility JavaVersion.VERSION_11
|
|
|
|
}
|
|
|
|
applicationVariants.configureEach { variant ->
|
|
|
|
variant.outputs.configureEach {
|
|
|
|
outputFileName = "Tusky_${variant.versionName}_${variant.versionCode}_${gitSha}_" +
|
|
|
|
"${variant.flavorName}_${buildType.name}.apk"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
kapt {
|
|
|
|
arguments {
|
|
|
|
arg("room.schemaLocation", "$projectDir/schemas")
|
|
|
|
arg("room.incremental", "true")
|
|
|
|
}
|
2019-05-18 08:06:30 +02:00
|
|
|
}
|
|
|
|
|
2022-11-04 20:10:26 +01:00
|
|
|
// library versions are in PROJECT_ROOT/gradle/libs.versions.toml
|
2017-01-03 00:30:27 +01:00
|
|
|
dependencies {
|
2022-11-04 20:10:26 +01: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
|
2023-02-04 19:58:53 +01:00
|
|
|
implementation libs.material.typeface
|
2022-11-04 20:10:26 +01:00
|
|
|
|
|
|
|
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-07 20:04:07 +01:00
|
|
|
testImplementation libs.androidx.work.testing
|
2022-11-04 20:10:26 +01:00
|
|
|
|
|
|
|
androidTestImplementation libs.espresso.core
|
|
|
|
androidTestImplementation libs.androidx.room.testing
|
|
|
|
androidTestImplementation libs.androidx.test.junit
|
2017-11-05 22:32:36 +01:00
|
|
|
}
|