Change 25 04 2026 add chats
This commit is contained in:
+122
-24
@@ -3,6 +3,10 @@ plugins {
|
||||
alias(libs.plugins.kotlin.android)
|
||||
alias(libs.plugins.hilt)
|
||||
alias(libs.plugins.kapt)
|
||||
id("com.google.gms.google-services")
|
||||
id("kotlin-parcelize")
|
||||
alias(libs.plugins.kotlin.compose)
|
||||
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -17,27 +21,48 @@ android {
|
||||
versionName = "1.0"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments("-DANDROID_STL=c++_shared")
|
||||
cppFlags("-Wl,-z,max-page-size=16384")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
debug {
|
||||
//applicationIdSuffix = ".debug"
|
||||
versionNameSuffix = "-debug"
|
||||
isMinifyEnabled = false
|
||||
isShrinkResources = false
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
}
|
||||
release {
|
||||
isMinifyEnabled = true
|
||||
isShrinkResources = true
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
}
|
||||
register("staging") {
|
||||
initWith(buildTypes["release"])
|
||||
isMinifyEnabled = true
|
||||
isShrinkResources = true
|
||||
applicationIdSuffix = ".staging"
|
||||
versionNameSuffix = "-staging"
|
||||
}
|
||||
}
|
||||
|
||||
androidComponents {
|
||||
onVariants { variant ->
|
||||
if (variant.buildType == "release") {
|
||||
variant.packaging.resources.excludes.add("META-INF/*.version")
|
||||
variant.packaging.resources.excludes.add("META-INF/*.kotlin_module")
|
||||
variant.packaging.resources.excludes.add("kotlin/**")
|
||||
variant.packaging.resources.excludes.add("DebugProbesKt.bin")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
// Compose и Hilt лучше работают на Java 17
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
@@ -51,7 +76,8 @@ android {
|
||||
}
|
||||
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion = "1.5.1" // Соответствует Kotlin 1.9.0
|
||||
//kotlinCompilerExtensionVersion = "1.5.1"
|
||||
kotlinCompilerExtensionVersion = "1.5.15"
|
||||
}
|
||||
|
||||
packaging {
|
||||
@@ -59,22 +85,21 @@ android {
|
||||
excludes += "/META-INF/{AL2.0,LGPL2.1,androidx.compose.material3_material3.version}"
|
||||
}
|
||||
}
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
path = file("src/main/cpp/CMakeLists.txt")
|
||||
version = "3.22.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
kapt {
|
||||
correctErrorTypes = true
|
||||
useBuildCache = false
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
// 1. Сначала объявляем BOM (один раз в самом начале)
|
||||
implementation(libs.play.services.cast.framework)
|
||||
// 1. BOM
|
||||
val composeBom = platform("androidx.compose:compose-bom:2024.02.01")
|
||||
implementation(composeBom)
|
||||
androidTestImplementation(composeBom)
|
||||
|
||||
// 2. Jetpack Compose (версии берутся из BOM)
|
||||
// 2. Compose
|
||||
implementation(libs.compose.ui)
|
||||
implementation(libs.compose.ui.graphics)
|
||||
implementation(libs.compose.ui.tooling.preview)
|
||||
@@ -82,29 +107,102 @@ dependencies {
|
||||
implementation(libs.lifecycle.viewmodel.compose)
|
||||
implementation(libs.foundation)
|
||||
|
||||
// 3. Material 3 (обязательно для PullToRefreshBox)
|
||||
// 3. Material 3
|
||||
implementation("androidx.compose.material3:material3")
|
||||
implementation("androidx.compose.material3:material3-window-size-class")
|
||||
implementation("androidx.compose.material:material-icons-extended")
|
||||
|
||||
// 4. Сеть (Retrofit)
|
||||
// 4. Network
|
||||
implementation(libs.retrofit)
|
||||
implementation(libs.retrofit.gson)
|
||||
implementation(libs.okhttp.logging)
|
||||
|
||||
// 5. Dagger Hilt
|
||||
// 5. Hilt
|
||||
implementation(libs.hilt.android)
|
||||
kapt(libs.hilt.compiler)
|
||||
implementation("androidx.hilt:hilt-navigation-compose:1.1.0")
|
||||
|
||||
// 6. Остальное
|
||||
// 6. AndroidX
|
||||
implementation(libs.appcompat)
|
||||
implementation(libs.material)
|
||||
implementation("androidx.constraintlayout:constraintlayout-compose:1.0.1")
|
||||
|
||||
// Тесты и отладка
|
||||
// 7. Tests
|
||||
testImplementation(libs.junit)
|
||||
androidTestImplementation(libs.ext.junit)
|
||||
androidTestImplementation(libs.espresso.core)
|
||||
debugImplementation(libs.compose.ui.tooling)
|
||||
|
||||
// 8. Lifecycle & Security
|
||||
implementation("androidx.lifecycle:lifecycle-process:2.8.7")
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.7")
|
||||
implementation("androidx.security:security-crypto:1.1.0-alpha06")
|
||||
implementation("com.squareup.okhttp3:okhttp:4.12.0")
|
||||
implementation("com.google.code.gson:gson:2.10.1")
|
||||
|
||||
// 9. Firebase
|
||||
implementation(platform("com.google.firebase:firebase-bom:34.12.0"))
|
||||
implementation("com.google.firebase:firebase-messaging")
|
||||
implementation("com.google.firebase:firebase-analytics")
|
||||
|
||||
// 10. Room
|
||||
implementation("androidx.room:room-runtime:2.7.1")
|
||||
implementation("androidx.room:room-ktx:2.7.1")
|
||||
kapt("androidx.room:room-compiler:2.7.1")
|
||||
|
||||
// 11. Media
|
||||
implementation("com.github.bumptech.glide:glide:4.16.0")
|
||||
kapt("com.github.bumptech.glide:compiler:4.16.0")
|
||||
implementation("id.zelory:compressor:3.0.1")
|
||||
implementation("com.otaliastudios:transcoder:0.10.3")
|
||||
implementation("com.github.yalantis:ucrop:2.2.6")
|
||||
implementation("androidx.work:work-runtime-ktx:2.9.0")
|
||||
// Криптография для секретных чатов
|
||||
implementation("org.bouncycastle:bcprov-jdk15on:1.70")
|
||||
implementation("org.bouncycastle:bcpkix-jdk15on:1.70")
|
||||
|
||||
// Для работы с большими числами (DH)
|
||||
implementation("org.apache.commons:commons-math3:3.6.1")
|
||||
// Для выбора изображений
|
||||
implementation("com.github.dhaval2404:imagepicker:2.1")
|
||||
|
||||
// Для сжатия изображений
|
||||
implementation("id.zelory:compressor:3.0.1")
|
||||
|
||||
// Для работы с видео
|
||||
implementation("com.otaliastudios:transcoder:0.10.3")
|
||||
|
||||
// Glide для загрузки изображений
|
||||
implementation("com.github.bumptech.glide:glide:4.16.0")
|
||||
|
||||
// Для работы с файлами
|
||||
implementation("androidx.documentfile:documentfile:1.0.1")
|
||||
}
|
||||
|
||||
tasks.register("checkApkSize") {
|
||||
doLast {
|
||||
val releaseDir = layout.buildDirectory.dir("outputs/apk/release").get().asFile
|
||||
val apkFile = releaseDir.listFiles()?.find { it.name.endsWith(".apk") }
|
||||
|
||||
if (apkFile != null) {
|
||||
val sizeMB = apkFile.length() / (1024.0 * 1024.0)
|
||||
println("✅ APK size: ${String.format("%.2f", sizeMB)} MB")
|
||||
|
||||
if (sizeMB > 100) {
|
||||
println("⚠️ WARNING: APK size > 100MB! Consider further optimization.")
|
||||
}
|
||||
} else {
|
||||
println("⚠️ No APK file found in $releaseDir")
|
||||
}
|
||||
}
|
||||
}
|
||||
//configurations.all {
|
||||
// resolutionStrategy {
|
||||
// force("org.jetbrains.kotlin:kotlin-stdlib:1.9.0")
|
||||
// force("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.0")
|
||||
// force("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.0")
|
||||
// force("org.jetbrains.kotlin:kotlin-reflect:1.9.0")
|
||||
// }
|
||||
//}
|
||||
|
||||
apply(plugin = "com.google.gms.google-services")
|
||||
Reference in New Issue
Block a user