123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- plugins {
- alias(libs.plugins.android.application)
- alias(libs.plugins.kotlin.android)
- alias(libs.plugins.kotlin.kapt)
- alias(libs.plugins.kotlin.parcelize)
- }
- apply from: 'getGitSha.gradle'
- final def gitSha = ext.getGitSha()
- // 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"
- android {
- compileSdk 33
- namespace "com.keylesspalace.tusky"
- defaultConfig {
- applicationId APP_ID
- namespace "com.keylesspalace.tusky"
- minSdk 23
- targetSdk 33
- versionCode 100
- versionName "21.0"
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- vectorDrawables.useSupportLibrary = true
- 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\"")
- }
- buildTypes {
- release {
- minifyEnabled true
- shrinkResources true
- proguardFiles 'proguard-rules.pro'
- }
- }
- flavorDimensions += "color"
- productFlavors {
- blue {}
- green {
- resValue "string", "app_name", APP_NAME + " Test"
- applicationIdSuffix ".test"
- versionNameSuffix "-" + gitSha
- }
- }
- lint {
- disable 'MissingTranslation'
- }
- buildFeatures {
- buildConfig true
- resValues true
- viewBinding true
- }
- testOptions {
- unitTests {
- returnDefaultValues = true
- includeAndroidResources = true
- }
- unitTests.all {
- systemProperty 'robolectric.logging.enabled', 'true'
- systemProperty 'robolectric.lazyload', 'ON'
- }
- }
- sourceSets {
- androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
- }
- // Exclude unneeded files added by libraries
- packagingOptions.resources.excludes += [
- 'LICENSE_OFL',
- 'LICENSE_UNICODE',
- ]
- bundle {
- language {
- // bundle all languages in every apk so the dynamic language switching works
- enableSplit = false
- }
- }
- dependenciesInfo {
- includeInApk false
- includeInBundle false
- }
- // Can remove this once https://issuetracker.google.com/issues/260059413 is fixed.
- // https://kotlinlang.org/docs/gradle-configure-project.html#gradle-java-toolchains-support
- 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")
- }
- }
- // library versions are in PROJECT_ROOT/gradle/libs.versions.toml
- 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
- 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
- testImplementation libs.truth
- testImplementation libs.turbine
- androidTestImplementation libs.espresso.core
- androidTestImplementation libs.androidx.room.testing
- androidTestImplementation libs.androidx.test.junit
- }
|