mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-07-24 23:25:19 +00:00
Refactor: Use Gradle version catalog
This commit introduces the Gradle version catalog (`libs.versions.toml`) to manage dependencies and plugin versions centrally. Key changes: - Added `gradle/libs.versions.toml` defining versions, libraries, plugins, and bundles. - Updated `app/build.gradle.kts` to reference dependencies and plugins from the version catalog. - Updated project-level `build.gradle.kts` to use plugin aliases from the version catalog.
This commit is contained in:
+28
-37
@@ -1,17 +1,17 @@
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
id("kotlin-parcelize")
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
alias(libs.plugins.kotlin.parcelize)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.bitchat.android"
|
||||
compileSdk = 34
|
||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.bitchat.android"
|
||||
minSdk = 26 // API 26 for proper BLE support
|
||||
targetSdk = 34
|
||||
minSdk = libs.versions.minSdk.get().toInt()
|
||||
targetSdk = libs.versions.targetSdk.get().toInt()
|
||||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
|
||||
@@ -41,7 +41,7 @@ android {
|
||||
compose = true
|
||||
}
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion = "1.5.5"
|
||||
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
|
||||
}
|
||||
packaging {
|
||||
resources {
|
||||
@@ -56,54 +56,45 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("androidx.core:core-ktx:1.12.0")
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
|
||||
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")
|
||||
// Core Android dependencies
|
||||
implementation(libs.androidx.core.ktx)
|
||||
implementation(libs.androidx.activity.compose)
|
||||
implementation(libs.androidx.appcompat)
|
||||
|
||||
// AppCompat for theme support
|
||||
implementation("androidx.appcompat:appcompat:1.6.1")
|
||||
// Compose
|
||||
implementation(platform(libs.androidx.compose.bom))
|
||||
implementation(libs.bundles.compose)
|
||||
|
||||
// ViewModel and LiveData
|
||||
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0")
|
||||
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.7.0")
|
||||
implementation("androidx.compose.runtime:runtime-livedata")
|
||||
// Lifecycle
|
||||
implementation(libs.bundles.lifecycle)
|
||||
|
||||
// Navigation
|
||||
implementation("androidx.navigation:navigation-compose:2.7.6")
|
||||
implementation(libs.androidx.navigation.compose)
|
||||
|
||||
// Permissions
|
||||
implementation("com.google.accompanist:accompanist-permissions:0.32.0")
|
||||
implementation(libs.accompanist.permissions)
|
||||
|
||||
// Cryptography
|
||||
implementation("org.bouncycastle:bcprov-jdk15on:1.70")
|
||||
implementation("com.google.crypto.tink:tink-android:1.10.0")
|
||||
implementation(libs.bundles.cryptography)
|
||||
|
||||
// JSON
|
||||
implementation("com.google.code.gson:gson:2.10.1")
|
||||
implementation(libs.gson)
|
||||
|
||||
// Coroutines
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
|
||||
implementation(libs.kotlinx.coroutines.android)
|
||||
|
||||
// Bluetooth
|
||||
implementation("no.nordicsemi.android:ble:2.6.1")
|
||||
implementation(libs.nordic.ble)
|
||||
|
||||
// Compression
|
||||
implementation("org.lz4:lz4-java:1.8.0")
|
||||
implementation(libs.lz4.java)
|
||||
|
||||
// Security preferences
|
||||
implementation("androidx.security:security-crypto:1.1.0-alpha06")
|
||||
implementation(libs.androidx.security.crypto)
|
||||
|
||||
// Testing
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
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")
|
||||
testImplementation(libs.bundles.testing)
|
||||
androidTestImplementation(platform(libs.androidx.compose.bom))
|
||||
androidTestImplementation(libs.bundles.compose.testing)
|
||||
debugImplementation(libs.androidx.compose.ui.tooling)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user