067f353e50
Moves most of the flow updates away from the Main thread. Removes the need to use the Main thread to access Account.userProfile
324 lines
8.5 KiB
Groovy
324 lines
8.5 KiB
Groovy
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
|
|
plugins {
|
|
alias(libs.plugins.androidApplication)
|
|
alias(libs.plugins.jetbrainsKotlinAndroid)
|
|
alias(libs.plugins.googleServices)
|
|
alias(libs.plugins.jetbrainsComposeCompiler)
|
|
alias(libs.plugins.serialization)
|
|
}
|
|
|
|
android {
|
|
namespace 'com.vitorpamplona.amethyst'
|
|
compileSdk libs.versions.android.compileSdk.get().toInteger()
|
|
|
|
defaultConfig {
|
|
applicationId "com.vitorpamplona.amethyst"
|
|
minSdk libs.versions.android.minSdk.get().toInteger()
|
|
targetSdk libs.versions.android.targetSdk.get().toInteger()
|
|
versionCode 418
|
|
versionName "0.94.3"
|
|
buildConfigField "String", "RELEASE_NOTES_ID", "\"fd42b23b9ef792059b1c1a89555443abbb11578f4b3c8430b452559eec7325f3\""
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
vectorDrawables {
|
|
useSupportLibrary true
|
|
}
|
|
resourceConfigurations += [
|
|
'ar',
|
|
'ar-rSA',
|
|
'bn-rBD',
|
|
'cs',
|
|
'cs-rCZ',
|
|
'cy-rGB',
|
|
'da-rDK',
|
|
'de',
|
|
'de-rDE',
|
|
'el-rGR',
|
|
'en-rGB',
|
|
'eo',
|
|
'eo-rUY',
|
|
'es',
|
|
'es-rES',
|
|
'es-rMX',
|
|
'es-rUS',
|
|
'et-rEE',
|
|
'fa',
|
|
'fa-rIR',
|
|
'fi-rFI',
|
|
'fo-rFO',
|
|
'fr',
|
|
'fr-rCA',
|
|
'fr-rFR',
|
|
'gu-rIN',
|
|
'hi-rIN',
|
|
'hr-rHR',
|
|
'hu',
|
|
'hu-rHU',
|
|
'in',
|
|
'in-rID',
|
|
'it-rIT',
|
|
'iw-rIL',
|
|
'ja',
|
|
'ja-rJP',
|
|
'kk-rKZ',
|
|
'ko-rKR',
|
|
'ks-rIN',
|
|
'ku-rTR',
|
|
'lt-rLT',
|
|
'ne-rNP',
|
|
'nl',
|
|
'nl-rBE',
|
|
'nl-rNL',
|
|
'pcm-rNG',
|
|
'pl-rPL',
|
|
'pt-rBR',
|
|
'pt-rPT',
|
|
'ru',
|
|
'ru-rRU',
|
|
'ru-rUA',
|
|
'sa-rIN',
|
|
'sl-rSI',
|
|
'so-rSO',
|
|
'sr-rSP',
|
|
'ss-rZA',
|
|
'sv-rSE',
|
|
'sw-rKE',
|
|
'sw-rTZ',
|
|
'ta',
|
|
'ta-rIN',
|
|
'th',
|
|
'th-rTH',
|
|
'tr',
|
|
'tr-rTR',
|
|
'uk',
|
|
'uk-rUA',
|
|
'ur-rIN',
|
|
'uz-rUZ',
|
|
'vi-rVN',
|
|
'zh',
|
|
'zh-rCN',
|
|
'zh-rHK',
|
|
'zh-rSG',
|
|
'zh-rTW'
|
|
]
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), 'proguard-rules.pro'
|
|
minifyEnabled true
|
|
}
|
|
debug {
|
|
applicationIdSuffix '.debug'
|
|
versionNameSuffix '-DEBUG'
|
|
resValue "string", "app_name", "@string/app_name_debug"
|
|
}
|
|
create("benchmark") {
|
|
initWith(getByName("release"))
|
|
applicationIdSuffix '.benchmark'
|
|
versionNameSuffix '-BENCHMARK'
|
|
resValue "string", "app_name", "@string/app_name_benchmark"
|
|
profileable true
|
|
signingConfig signingConfigs.debug
|
|
}
|
|
}
|
|
|
|
flavorDimensions = ["channel"]
|
|
|
|
productFlavors {
|
|
play {
|
|
getIsDefault().set(true)
|
|
dimension "channel"
|
|
}
|
|
|
|
fdroid {
|
|
dimension "channel"
|
|
}
|
|
}
|
|
|
|
splits {
|
|
abi {
|
|
enable true
|
|
reset()
|
|
include "x86", "x86_64", "arm64-v8a", "armeabi-v7a"
|
|
universalApk true
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
}
|
|
|
|
buildFeatures {
|
|
compose true
|
|
buildConfig true
|
|
}
|
|
|
|
packagingOptions {
|
|
resources {
|
|
excludes += ['/META-INF/{AL2.0,LGPL2.1}', '**/libscrypt.dylib']
|
|
}
|
|
}
|
|
|
|
lint {
|
|
disable 'MissingTranslation'
|
|
}
|
|
|
|
testOptions {
|
|
unitTests.returnDefaultValues = true
|
|
}
|
|
}
|
|
|
|
kotlin {
|
|
compilerOptions {
|
|
jvmTarget = JvmTarget.JVM_17
|
|
}
|
|
}
|
|
|
|
composeCompiler {
|
|
reportsDestination = layout.buildDirectory.dir("compose_compiler")
|
|
metricsDestination = layout.buildDirectory.dir("compose_compiler")
|
|
}
|
|
|
|
dependencies {
|
|
implementation platform(libs.androidx.compose.bom)
|
|
|
|
implementation project(path: ':quartz')
|
|
implementation project(path: ':commons')
|
|
implementation project(path: ':ammolite')
|
|
implementation libs.androidx.core.ktx
|
|
implementation libs.androidx.activity.compose
|
|
|
|
implementation libs.androidx.ui
|
|
implementation libs.androidx.ui.graphics
|
|
implementation libs.androidx.ui.tooling.preview
|
|
|
|
// Needs this to open gallery / image upload
|
|
implementation libs.androidx.fragment.ktx
|
|
|
|
// Navigation
|
|
implementation libs.androidx.navigation.compose
|
|
|
|
// Material 3 Design
|
|
implementation libs.androidx.material3
|
|
implementation libs.androidx.material.icons
|
|
|
|
// Adaptive Layout / Two Pane
|
|
implementation libs.androidx.material3.windowSize
|
|
implementation libs.accompanist.adaptive
|
|
|
|
// Lifecycle
|
|
implementation libs.androidx.lifecycle.runtime.ktx
|
|
implementation libs.androidx.lifecycle.runtime.compose
|
|
implementation libs.androidx.lifecycle.viewmodel.compose
|
|
|
|
// Zoomable images
|
|
implementation libs.zoomable
|
|
|
|
// Biometrics
|
|
implementation libs.androidx.biometric.ktx
|
|
|
|
// Websockets API
|
|
implementation libs.okhttp
|
|
|
|
// Encrypted Key Storage
|
|
implementation libs.androidx.security.crypto.ktx
|
|
|
|
// view videos
|
|
implementation libs.androidx.media3.exoplayer
|
|
implementation libs.androidx.media3.exoplayer.hls
|
|
implementation libs.androidx.media3.ui
|
|
implementation libs.androidx.media3.session
|
|
|
|
// important for proxy / tor
|
|
implementation libs.androidx.media3.datasource.okhttp
|
|
|
|
// Load images from the web.
|
|
implementation libs.coil.compose
|
|
// view gifs
|
|
implementation libs.coil.gif
|
|
// view svgs
|
|
implementation libs.coil.svg
|
|
// enables network for coil
|
|
implementation libs.coil.okhttp
|
|
|
|
// Permission to upload pictures:
|
|
implementation libs.accompanist.permissions
|
|
|
|
// For QR generation
|
|
implementation libs.zxing
|
|
implementation libs.zxing.embedded
|
|
|
|
// Markdown
|
|
//implementation "com.halilibo.compose-richtext:richtext-ui:0.16.0"
|
|
//implementation "com.halilibo.compose-richtext:richtext-ui-material:0.16.0"
|
|
//implementation "com.halilibo.compose-richtext:richtext-commonmark:0.16.0"
|
|
|
|
// Markdown (With fix for full-image bleeds)
|
|
implementation libs.markdown.ui
|
|
implementation libs.markdown.ui.material3
|
|
implementation libs.markdown.commonmark
|
|
|
|
// Language picker and Theme chooser
|
|
implementation libs.androidx.appcompat
|
|
implementation libs.androidx.window.core.android
|
|
|
|
// Local model for language identification
|
|
playImplementation libs.google.mlkit.language.id
|
|
|
|
// Google services model the translate text
|
|
playImplementation libs.google.mlkit.translate
|
|
|
|
// PushNotifications
|
|
playImplementation platform(libs.firebase.bom)
|
|
playImplementation libs.firebase.messaging
|
|
|
|
//PushNotifications(FDroid)
|
|
fdroidImplementation libs.unifiedpush
|
|
|
|
// Charts
|
|
implementation libs.vico.charts.core
|
|
implementation libs.vico.charts.compose
|
|
implementation libs.vico.charts.views
|
|
implementation libs.vico.charts.m3
|
|
|
|
// GeoHash
|
|
implementation libs.drfonfon.geohash
|
|
|
|
// Waveform visualizer
|
|
implementation libs.audiowaveform
|
|
|
|
// Video compression lib
|
|
implementation libs.abedElazizShe.image.compressor
|
|
// Image compression lib
|
|
implementation libs.zelory.video.compressor
|
|
|
|
// Cbor for cashuB format
|
|
implementation libs.kotlinx.serialization.cbor
|
|
|
|
implementation libs.tor.android
|
|
implementation libs.jtorctl
|
|
|
|
testImplementation libs.junit
|
|
testImplementation libs.mockk
|
|
testImplementation libs.kotlinx.coroutines.test
|
|
|
|
androidTestImplementation platform(libs.androidx.compose.bom)
|
|
androidTestImplementation libs.androidx.junit
|
|
androidTestImplementation libs.androidx.junit.ktx
|
|
androidTestImplementation libs.androidx.espresso.core
|
|
|
|
debugImplementation platform(libs.androidx.compose.bom)
|
|
debugImplementation libs.androidx.ui.tooling
|
|
debugImplementation libs.androidx.ui.test.manifest
|
|
|
|
implementation libs.androidx.camera.core
|
|
implementation libs.androidx.camera.camera2
|
|
implementation libs.androidx.camera.lifecycle
|
|
implementation libs.androidx.camera.view
|
|
implementation libs.androidx.camera.extensions
|
|
}
|
|
|