feat: Implement message packets for sending and receiving messages, including delivery and read notifications feat: Enhance ProtocolManager to handle message sending, delivery, and typing status with appropriate logging feat: Refactor ChatDetailScreen to utilize ChatViewModel for managing chat state and message input feat: Create ChatViewModel to manage chat messages, input state, and packet listeners for incoming messages build: Add KSP plugin for annotation processing and configure Java 17 for the build environment
136 lines
4.3 KiB
Kotlin
136 lines
4.3 KiB
Kotlin
plugins {
|
|
id("com.android.application")
|
|
id("org.jetbrains.kotlin.android")
|
|
id("com.google.devtools.ksp")
|
|
}
|
|
|
|
android {
|
|
namespace = "com.rosetta.messenger"
|
|
compileSdk = 34
|
|
|
|
defaultConfig {
|
|
applicationId = "com.rosetta.messenger"
|
|
minSdk = 24
|
|
targetSdk = 34
|
|
versionCode = 1
|
|
versionName = "1.0"
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
vectorDrawables {
|
|
useSupportLibrary = true
|
|
}
|
|
|
|
javaCompileOptions {
|
|
annotationProcessorOptions {
|
|
arguments += mapOf(
|
|
"room.schemaLocation" to "$projectDir/schemas",
|
|
"room.incremental" to "true"
|
|
)
|
|
}
|
|
}
|
|
}
|
|
|
|
signingConfigs {
|
|
getByName("debug") {
|
|
storeFile = file("debug.keystore")
|
|
storePassword = "android"
|
|
keyAlias = "androiddebugkey"
|
|
keyPassword = "android"
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
signingConfig = signingConfigs.getByName("debug")
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
freeCompilerArgs += listOf(
|
|
"-Xjvm-default=all"
|
|
)
|
|
}
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
composeOptions {
|
|
kotlinCompilerExtensionVersion = "1.5.4"
|
|
}
|
|
packaging {
|
|
resources {
|
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation("androidx.core:core-ktx:1.12.0")
|
|
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
|
|
implementation("androidx.activity:activity-compose:1.8.2")
|
|
implementation(platform("androidx.compose:compose-bom:2023.10.01"))
|
|
implementation("androidx.compose.ui:ui")
|
|
implementation("androidx.compose.ui:ui-graphics")
|
|
implementation("androidx.compose.ui:ui-tooling-preview")
|
|
implementation("androidx.compose.material3:material3")
|
|
|
|
// Accompanist for pager and animations
|
|
implementation("com.google.accompanist:accompanist-pager:0.32.0")
|
|
implementation("com.google.accompanist:accompanist-pager-indicators:0.32.0")
|
|
|
|
// Navigation
|
|
implementation("androidx.navigation:navigation-compose:2.7.6")
|
|
|
|
// DataStore for preferences
|
|
implementation("androidx.datastore:datastore-preferences:1.0.0")
|
|
|
|
// Foundation for pager (Compose)
|
|
implementation("androidx.compose.foundation:foundation:1.5.4")
|
|
|
|
// Icons extended
|
|
implementation("androidx.compose.material:material-icons-extended:1.5.4")
|
|
|
|
// Lottie for animations
|
|
implementation("com.airbnb.android:lottie-compose:6.1.0")
|
|
|
|
// Coil for image loading
|
|
implementation("io.coil-kt:coil-compose:2.5.0")
|
|
|
|
// Crypto libraries for key generation
|
|
implementation("org.bitcoinj:bitcoinj-core:0.16.2")
|
|
implementation("org.bouncycastle:bcprov-jdk15to18:1.77")
|
|
|
|
// Security for encrypted storage
|
|
implementation("androidx.security:security-crypto:1.1.0-alpha06")
|
|
|
|
// Room for database
|
|
implementation("androidx.room:room-runtime:2.6.1")
|
|
implementation("androidx.room:room-ktx:2.6.1")
|
|
ksp("androidx.room:room-compiler:2.6.1")
|
|
|
|
// Biometric authentication
|
|
implementation("androidx.biometric:biometric:1.1.0")
|
|
|
|
// Testing dependencies
|
|
testImplementation("junit:junit:4.13.2")
|
|
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3")
|
|
testImplementation("androidx.arch.core:core-testing:2.2.0")
|
|
testImplementation("io.mockk:mockk:1.13.8")
|
|
testImplementation("org.robolectric:robolectric:4.11.1")
|
|
|
|
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
|
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
|
|
androidTestImplementation(platform("androidx.compose:compose-bom:2023.10.01"))
|
|
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
|
|
debugImplementation("androidx.compose.ui:ui-tooling")
|
|
debugImplementation("androidx.compose.ui:ui-test-manifest")
|
|
}
|