mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-07-25 04:05:21 +00:00
Merge pull request #30 from prudhvir3ddy/prudhvir3ddy/version_catalogs
Better dependency management using Gradle version catalog
This commit is contained in:
+28
-38
@@ -1,17 +1,17 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
alias(libs.plugins.android.application)
|
||||||
id("org.jetbrains.kotlin.android")
|
alias(libs.plugins.kotlin.android)
|
||||||
id("kotlin-parcelize")
|
alias(libs.plugins.kotlin.parcelize)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "com.bitchat.android"
|
namespace = "com.bitchat.android"
|
||||||
compileSdk = 34
|
compileSdk = libs.versions.compileSdk.get().toInt()
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "com.bitchat.android"
|
applicationId = "com.bitchat.android"
|
||||||
minSdk = 26 // API 26 for proper BLE support
|
minSdk = libs.versions.minSdk.get().toInt()
|
||||||
targetSdk = 34
|
targetSdk = libs.versions.targetSdk.get().toInt()
|
||||||
versionCode = 1
|
versionCode = 1
|
||||||
versionName = "1.0"
|
versionName = "1.0"
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ android {
|
|||||||
compose = true
|
compose = true
|
||||||
}
|
}
|
||||||
composeOptions {
|
composeOptions {
|
||||||
kotlinCompilerExtensionVersion = "1.5.5"
|
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
|
||||||
}
|
}
|
||||||
packaging {
|
packaging {
|
||||||
resources {
|
resources {
|
||||||
@@ -56,55 +56,45 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("androidx.core:core-ktx:1.12.0")
|
// Core Android dependencies
|
||||||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
|
implementation(libs.androidx.core.ktx)
|
||||||
implementation("androidx.activity:activity-compose:1.8.2")
|
implementation(libs.androidx.activity.compose)
|
||||||
implementation(platform("androidx.compose:compose-bom:2023.10.01"))
|
implementation(libs.androidx.appcompat)
|
||||||
implementation("androidx.compose.ui:ui")
|
|
||||||
implementation("androidx.compose.ui:ui-graphics")
|
|
||||||
implementation("androidx.compose.ui:ui-tooling-preview")
|
|
||||||
implementation("androidx.compose.material3:material3")
|
|
||||||
implementation("androidx.compose.material:material-icons-extended")
|
|
||||||
|
|
||||||
// AppCompat for theme support
|
// Compose
|
||||||
implementation("androidx.appcompat:appcompat:1.6.1")
|
implementation(platform(libs.androidx.compose.bom))
|
||||||
|
implementation(libs.bundles.compose)
|
||||||
|
|
||||||
// ViewModel and LiveData
|
// Lifecycle
|
||||||
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0")
|
implementation(libs.bundles.lifecycle)
|
||||||
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.7.0")
|
|
||||||
implementation("androidx.compose.runtime:runtime-livedata")
|
|
||||||
|
|
||||||
// Navigation
|
// Navigation
|
||||||
implementation("androidx.navigation:navigation-compose:2.7.6")
|
implementation(libs.androidx.navigation.compose)
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
implementation("com.google.accompanist:accompanist-permissions:0.32.0")
|
implementation(libs.accompanist.permissions)
|
||||||
|
|
||||||
// Cryptography
|
// Cryptography
|
||||||
implementation("org.bouncycastle:bcprov-jdk15on:1.70")
|
implementation(libs.bundles.cryptography)
|
||||||
implementation("com.google.crypto.tink:tink-android:1.10.0")
|
|
||||||
|
|
||||||
// JSON
|
// JSON
|
||||||
implementation("com.google.code.gson:gson:2.10.1")
|
implementation(libs.gson)
|
||||||
|
|
||||||
// Coroutines
|
// Coroutines
|
||||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
|
implementation(libs.kotlinx.coroutines.android)
|
||||||
|
|
||||||
// Bluetooth
|
// Bluetooth
|
||||||
implementation("no.nordicsemi.android:ble:2.6.1")
|
implementation(libs.nordic.ble)
|
||||||
|
|
||||||
// Compression
|
// Compression
|
||||||
implementation("org.lz4:lz4-java:1.8.0")
|
implementation(libs.lz4.java)
|
||||||
|
|
||||||
// Security preferences
|
// Security preferences
|
||||||
implementation("androidx.security:security-crypto:1.1.0-alpha06")
|
implementation(libs.androidx.security.crypto)
|
||||||
|
|
||||||
// Testing
|
// Testing
|
||||||
testImplementation("junit:junit:4.13.2")
|
testImplementation(libs.bundles.testing)
|
||||||
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
androidTestImplementation(platform(libs.androidx.compose.bom))
|
||||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
|
androidTestImplementation(libs.bundles.compose.testing)
|
||||||
androidTestImplementation(platform("androidx.compose:compose-bom:2023.10.01"))
|
debugImplementation(libs.androidx.compose.ui.tooling)
|
||||||
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
|
|
||||||
debugImplementation("androidx.compose.ui:ui-tooling")
|
|
||||||
debugImplementation("androidx.compose.ui:ui-test-manifest")
|
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -1,6 +1,6 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application") version "8.2.0" apply false
|
alias(libs.plugins.android.application) apply false
|
||||||
id("org.jetbrains.kotlin.android") version "1.9.20" apply false
|
alias(libs.plugins.kotlin.android) apply false
|
||||||
id("com.android.library") version "8.2.0" apply false
|
alias(libs.plugins.android.library) apply false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,138 @@
|
|||||||
|
[versions]
|
||||||
|
# Android and Kotlin
|
||||||
|
agp = "8.2.0"
|
||||||
|
kotlin = "1.9.20"
|
||||||
|
compileSdk = "34"
|
||||||
|
minSdk = "26" # API 26 for proper BLE support
|
||||||
|
targetSdk = "34"
|
||||||
|
|
||||||
|
# AndroidX Core
|
||||||
|
core-ktx = "1.12.0"
|
||||||
|
lifecycle-runtime = "2.7.0"
|
||||||
|
activity-compose = "1.8.2"
|
||||||
|
appcompat = "1.6.1"
|
||||||
|
|
||||||
|
# Compose
|
||||||
|
compose-bom = "2023.10.01"
|
||||||
|
compose-compiler = "1.5.5"
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
navigation-compose = "2.7.6"
|
||||||
|
|
||||||
|
# Accompanist
|
||||||
|
accompanist-permissions = "0.32.0"
|
||||||
|
|
||||||
|
# Cryptography
|
||||||
|
bouncycastle = "1.70"
|
||||||
|
tink-android = "1.10.0"
|
||||||
|
|
||||||
|
# JSON
|
||||||
|
gson = "2.10.1"
|
||||||
|
|
||||||
|
# Coroutines
|
||||||
|
kotlinx-coroutines = "1.7.3"
|
||||||
|
|
||||||
|
# Bluetooth
|
||||||
|
nordic-ble = "2.6.1"
|
||||||
|
|
||||||
|
# Compression
|
||||||
|
lz4-java = "1.8.0"
|
||||||
|
|
||||||
|
# Security
|
||||||
|
security-crypto = "1.1.0-alpha06"
|
||||||
|
|
||||||
|
# Testing
|
||||||
|
junit = "4.13.2"
|
||||||
|
androidx-test-ext = "1.1.5"
|
||||||
|
espresso = "3.5.1"
|
||||||
|
|
||||||
|
[libraries]
|
||||||
|
# AndroidX Core
|
||||||
|
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "core-ktx" }
|
||||||
|
androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycle-runtime" }
|
||||||
|
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activity-compose" }
|
||||||
|
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
|
||||||
|
|
||||||
|
# Compose
|
||||||
|
androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "compose-bom" }
|
||||||
|
androidx-compose-ui = { module = "androidx.compose.ui:ui" }
|
||||||
|
androidx-compose-ui-graphics = { module = "androidx.compose.ui:ui-graphics" }
|
||||||
|
androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" }
|
||||||
|
androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" }
|
||||||
|
androidx-compose-material3 = { module = "androidx.compose.material3:material3" }
|
||||||
|
androidx-compose-runtime-livedata = { module = "androidx.compose.runtime:runtime-livedata" }
|
||||||
|
androidx-compose-material-icons-extended = { module = "androidx.compose.material:material-icons-extended" }
|
||||||
|
|
||||||
|
# Lifecycle
|
||||||
|
androidx-lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycle-runtime" }
|
||||||
|
androidx-lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycle-runtime" }
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigation-compose" }
|
||||||
|
|
||||||
|
# Accompanist
|
||||||
|
accompanist-permissions = { module = "com.google.accompanist:accompanist-permissions", version.ref = "accompanist-permissions" }
|
||||||
|
|
||||||
|
# Cryptography
|
||||||
|
bouncycastle-bcprov = { module = "org.bouncycastle:bcprov-jdk15on", version.ref = "bouncycastle" }
|
||||||
|
google-tink-android = { module = "com.google.crypto.tink:tink-android", version.ref = "tink-android" }
|
||||||
|
|
||||||
|
# JSON
|
||||||
|
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
|
||||||
|
|
||||||
|
# Coroutines
|
||||||
|
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinx-coroutines" }
|
||||||
|
|
||||||
|
# Bluetooth
|
||||||
|
nordic-ble = { module = "no.nordicsemi.android:ble", version.ref = "nordic-ble" }
|
||||||
|
|
||||||
|
# Compression
|
||||||
|
lz4-java = { module = "org.lz4:lz4-java", version.ref = "lz4-java" }
|
||||||
|
|
||||||
|
# Security
|
||||||
|
androidx-security-crypto = { module = "androidx.security:security-crypto", version.ref = "security-crypto" }
|
||||||
|
|
||||||
|
# Testing
|
||||||
|
junit = { module = "junit:junit", version.ref = "junit" }
|
||||||
|
androidx-test-ext-junit = { module = "androidx.test.ext:junit", version.ref = "androidx-test-ext" }
|
||||||
|
androidx-test-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso" }
|
||||||
|
androidx-compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4" }
|
||||||
|
androidx-compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest" }
|
||||||
|
|
||||||
|
[plugins]
|
||||||
|
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||||
|
android-library = { id = "com.android.library", version.ref = "agp" }
|
||||||
|
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
||||||
|
kotlin-parcelize = { id = "kotlin-parcelize" }
|
||||||
|
|
||||||
|
[bundles]
|
||||||
|
compose = [
|
||||||
|
"androidx-compose-ui",
|
||||||
|
"androidx-compose-ui-graphics",
|
||||||
|
"androidx-compose-ui-tooling-preview",
|
||||||
|
"androidx-compose-material3",
|
||||||
|
"androidx-compose-runtime-livedata",
|
||||||
|
"androidx-compose-material-icons-extended"
|
||||||
|
]
|
||||||
|
|
||||||
|
lifecycle = [
|
||||||
|
"androidx-lifecycle-runtime-ktx",
|
||||||
|
"androidx-lifecycle-viewmodel-compose",
|
||||||
|
"androidx-lifecycle-livedata-ktx"
|
||||||
|
]
|
||||||
|
|
||||||
|
cryptography = [
|
||||||
|
"bouncycastle-bcprov",
|
||||||
|
"google-tink-android"
|
||||||
|
]
|
||||||
|
|
||||||
|
testing = [
|
||||||
|
"junit",
|
||||||
|
"androidx-test-ext-junit",
|
||||||
|
"androidx-test-espresso-core"
|
||||||
|
]
|
||||||
|
|
||||||
|
compose-testing = [
|
||||||
|
"androidx-compose-ui-test-junit4",
|
||||||
|
"androidx-compose-ui-test-manifest"
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user