diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 27cd130..0825791 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -21,203 +21,200 @@ import java.util.* @Suppress("DSL_SCOPE_VIOLATION") plugins { - id(libs.plugins.android.application.get().pluginId) - id(libs.plugins.kotlin.android.get().pluginId) - id(libs.plugins.firebase.crashlytics.get().pluginId) - id(libs.plugins.kotlin.serialization.get().pluginId) - id(libs.plugins.hilt.get().pluginId) - id(libs.plugins.ksp.get().pluginId) - id(libs.plugins.spotless.get().pluginId) - id(libs.plugins.baseline.profile.get().pluginId) - id("com.google.gms.google-services") + id(libs.plugins.android.application.get().pluginId) + id(libs.plugins.kotlin.android.get().pluginId) + id(libs.plugins.firebase.crashlytics.get().pluginId) + id(libs.plugins.kotlin.serialization.get().pluginId) + id(libs.plugins.compose.compiler.get().pluginId) + id(libs.plugins.hilt.get().pluginId) + id(libs.plugins.ksp.get().pluginId) + id(libs.plugins.spotless.get().pluginId) + id(libs.plugins.baseline.profile.get().pluginId) + id("com.google.gms.google-services") } android { - namespace = "io.getstream.android.video.chat.compose" - compileSdk = Configuration.compileSdk - - defaultConfig { - applicationId = "io.getstream.android.video.chat.compose" - minSdk = Configuration.minSdk - targetSdk = Configuration.targetSdk - versionCode = Configuration.versionCode - versionName = Configuration.versionName - vectorDrawables { - useSupportLibrary = true - } + namespace = "io.getstream.android.video.chat.compose" + compileSdk = Configuration.compileSdk + + defaultConfig { + applicationId = "io.getstream.android.video.chat.compose" + minSdk = Configuration.minSdk + targetSdk = Configuration.targetSdk + versionCode = Configuration.versionCode + versionName = Configuration.versionName + vectorDrawables { + useSupportLibrary = true } + } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } - kotlinOptions { - jvmTarget = "17" - } + kotlinOptions { + jvmTarget = "17" + } - buildFeatures { - compose = true - } + composeCompiler { + enableStrongSkippingMode = true + } - composeOptions { - kotlinCompilerExtensionVersion = libs.versions.androidxComposeCompiler.get() - } + val signFile: File = rootProject.file(".sign/keystore.properties") + if (signFile.exists()) { + val properties = Properties() + properties.load(FileInputStream(signFile)) - val signFile: File = rootProject.file(".sign/keystore.properties") - if (signFile.exists()) { - val properties = Properties() - properties.load(FileInputStream(signFile)) - - signingConfigs { - create("release") { - keyAlias = properties["keyAlias"] as? String - keyPassword = properties["keyPassword"] as? String - storeFile = rootProject.file(properties["keystore"] as String) - storePassword = properties["storePassword"] as? String - } - } - } else { - signingConfigs { - create("release") { - keyAlias = "androiddebugkey" - keyPassword = "android" - storeFile = rootProject.file(".sign/debug.keystore.jks") - storePassword = "android" - } - } + signingConfigs { + create("release") { + keyAlias = properties["keyAlias"] as? String + keyPassword = properties["keyPassword"] as? String + storeFile = rootProject.file(properties["keystore"] as String) + storePassword = properties["storePassword"] as? String + } } - + } else { signingConfigs { - getByName("debug") { - keyAlias = "androiddebugkey" - keyPassword = "android" - storeFile = rootProject.file(".sign/debug.keystore.jks") - storePassword = "android" - } + create("release") { + keyAlias = "androiddebugkey" + keyPassword = "android" + storeFile = rootProject.file(".sign/debug.keystore.jks") + storePassword = "android" + } } - - buildTypes { - getByName("debug") { - versionNameSuffix = "-DEBUG" - applicationIdSuffix = ".debug" - isDebuggable = true - isMinifyEnabled = false - isShrinkResources = false - signingConfig = signingConfigs.getByName("debug") - } - getByName("release") { - isMinifyEnabled = true - proguardFiles( - getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" - ) - signingConfig = signingConfigs.getByName("release") - } - create("benchmark") { - isDebuggable = true - isMinifyEnabled = false - isShrinkResources = false - signingConfig = signingConfigs.getByName("debug") - matchingFallbacks += listOf("release") - proguardFiles("benchmark-rules.pro") - } + } + + signingConfigs { + getByName("debug") { + keyAlias = "androiddebugkey" + keyPassword = "android" + storeFile = rootProject.file(".sign/debug.keystore.jks") + storePassword = "android" } - - flavorDimensions += "environment" - productFlavors { - create("development") { - dimension = "environment" - applicationIdSuffix = ".dogfooding" - } - create("production") { - dimension = "environment" - } + } + + buildTypes { + getByName("debug") { + versionNameSuffix = "-DEBUG" + applicationIdSuffix = ".debug" + isDebuggable = true + isMinifyEnabled = false + isShrinkResources = false + signingConfig = signingConfigs.getByName("debug") } - - buildFeatures { - resValues = true - buildConfig = true + getByName("release") { + isMinifyEnabled = true + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + signingConfig = signingConfigs.getByName("release") } - - packaging { - jniLibs.pickFirsts.add("lib/*/librenderscript-toolkit.so") + create("benchmark") { + isDebuggable = true + isMinifyEnabled = false + isShrinkResources = false + signingConfig = signingConfigs.getByName("debug") + matchingFallbacks += listOf("release") + proguardFiles("benchmark-rules.pro") } + } - lint { - abortOnError = false + flavorDimensions += "environment" + productFlavors { + create("development") { + dimension = "environment" + applicationIdSuffix = ".dogfooding" } - - baselineProfile { - mergeIntoMain = true + create("production") { + dimension = "environment" } + } + + buildFeatures { + resValues = true + buildConfig = true + } + + packaging { + jniLibs.pickFirsts.add("lib/*/librenderscript-toolkit.so") + } + + lint { + abortOnError = false + } + + baselineProfile { + mergeIntoMain = true + } } dependencies { - // Stream Video SDK - implementation(libs.stream.video.compose) - implementation(libs.stream.video.filter) - implementation(libs.stream.video.previewdata) - - // Stream Chat SDK - implementation(libs.stream.chat.compose) - implementation(libs.stream.chat.offline) - implementation(libs.stream.chat.state) - implementation(libs.stream.chat.ui.utils) - - implementation(libs.stream.push.firebase) - implementation(libs.stream.log.android) - - implementation(libs.androidx.material) - implementation(libs.androidx.core.ktx) - implementation(libs.androidx.lifecycle.runtime) - - // Network - implementation(libs.okhttp) - implementation(libs.retrofit) - implementation(libs.kotlinx.coroutines.android) - implementation(libs.kotlinx.serialization.json) - implementation(libs.kotlinx.serialization.converter) - - // Compose - implementation(platform(libs.androidx.compose.bom)) - implementation(libs.androidx.activity.compose) - implementation(libs.androidx.compose.ui) - implementation(libs.androidx.compose.ui.tooling) - implementation(libs.androidx.compose.runtime) - implementation(libs.androidx.compose.navigation) - implementation(libs.androidx.compose.foundation) - implementation(libs.androidx.compose.material) - implementation(libs.androidx.compose.material.iconsExtended) - implementation(libs.androidx.hilt.navigation) - implementation(libs.androidx.lifecycle.runtime.compose) - implementation(libs.accompanist.permission) - implementation(libs.landscapist.coil) - - // QR code scanning - implementation(libs.androidx.camera.core) - implementation(libs.play.services.mlkit.barcode.scanning) - implementation(libs.androidx.camera.view) - implementation(libs.androidx.camera.lifecycle) - implementation(libs.androidx.camera.camera2) - - // Hilt - implementation(libs.hilt.android) - ksp(libs.hilt.compiler) - - // Firebase - implementation(platform(libs.firebase.bom)) - implementation(libs.firebase.crashlytics) - implementation(libs.firebase.config) - implementation(libs.firebase.analytics) - - // Moshi - implementation(libs.moshi.kotlin) - - // Video Filters - implementation(libs.google.mlkit.selfie.segmentation) - implementation(files("libs/renderscript-toolkit.aar")) - - // Play - implementation(libs.play.auth) + // Stream Video SDK + implementation(libs.stream.video.compose) + implementation(libs.stream.video.filter) + implementation(libs.stream.video.previewdata) + + // Stream Chat SDK + implementation(libs.stream.chat.compose) + implementation(libs.stream.chat.offline) + implementation(libs.stream.chat.state) + implementation(libs.stream.chat.ui.utils) + + implementation(libs.stream.push.firebase) + implementation(libs.stream.log.android) + + implementation(libs.androidx.material) + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.lifecycle.runtime) + + // Network + implementation(libs.okhttp) + implementation(libs.retrofit) + implementation(libs.kotlinx.coroutines.android) + implementation(libs.kotlinx.serialization.json) + implementation(libs.kotlinx.serialization.converter) + + // Compose + implementation(platform(libs.androidx.compose.bom)) + implementation(libs.androidx.activity.compose) + implementation(libs.androidx.compose.ui) + implementation(libs.androidx.compose.ui.tooling) + implementation(libs.androidx.compose.runtime) + implementation(libs.androidx.compose.navigation) + implementation(libs.androidx.compose.foundation) + implementation(libs.androidx.compose.material) + implementation(libs.androidx.compose.material.iconsExtended) + implementation(libs.androidx.hilt.navigation) + implementation(libs.androidx.lifecycle.runtime.compose) + implementation(libs.accompanist.permission) + implementation(libs.landscapist.coil) + + // QR code scanning + implementation(libs.androidx.camera.core) + implementation(libs.play.services.mlkit.barcode.scanning) + implementation(libs.androidx.camera.view) + implementation(libs.androidx.camera.lifecycle) + implementation(libs.androidx.camera.camera2) + + // Hilt + implementation(libs.hilt.android) + ksp(libs.hilt.compiler) + + // Firebase + implementation(platform(libs.firebase.bom)) + implementation(libs.firebase.crashlytics) + implementation(libs.firebase.config) + implementation(libs.firebase.analytics) + + // Moshi + implementation(libs.moshi.kotlin) + + // Video Filters + implementation(libs.google.mlkit.selfie.segmentation) + implementation(files("libs/renderscript-toolkit.aar")) + + // Play + implementation(libs.play.auth) } \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index cb7b6e8..d6eaadd 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,6 +7,7 @@ plugins { alias(libs.plugins.kotlin.android) apply false alias(libs.plugins.kotlin.serialization) apply false alias(libs.plugins.ksp) apply false + alias(libs.plugins.compose.compiler) apply false alias(libs.plugins.dokka) apply false alias(libs.plugins.spotless) apply false alias(libs.plugins.google.gms) apply false diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5c4c19b..0963214 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,8 +2,8 @@ androidGradlePlugin = "8.4.1" cameraCamera2 = "1.3.0" spotless = "6.21.0" -kotlin = "1.9.23" -ksp = "1.9.23-1.0.20" +kotlin = "2.0.0" +ksp = "2.0.0-1.0.21" kotlinSerialization = "1.6.3" kotlinSerializationConverter = "1.0.0" kotlinxCoroutines = "1.8.1" @@ -14,7 +14,6 @@ androidxCore = "1.13.1" androidxAnnotation = "1.7.1" androidxLifecycle = "2.7.0" androidxActivity = "1.8.2" -androidxComposeCompiler = "1.5.11" androidxComposeBom = "2024.05.00" androidxHiltNavigation = "1.2.0" androidxComposeNavigation = "2.7.7" @@ -101,6 +100,7 @@ android-test = { id = "com.android.test", version.ref = "androidGradlePlugin" } ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } +compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" } spotless = { id = "com.diffplug.spotless", version.ref = "spotless" } dokka = { id = "org.jetbrains.dokka", version.ref = "kotlinDokka" }