Added version catalog

This commit is contained in:
Sad Ellie 2023-01-06 20:16:25 +04:00
parent e27f8fb2f4
commit 780e9e11c1
3 changed files with 109 additions and 39 deletions

View File

@ -16,8 +16,6 @@ if (!gradle.startParameter.taskRequests.toString().contains("Fdroid")) {
println("Didn't add Google Services since F-Droid flavor was chosen.")
}
val composeVersion = "1.4.0-alpha03"
// Flavor names
val playStore = "playStore"
val appGallery = "appGallery"
@ -149,64 +147,65 @@ configurations {
}
}
@Suppress("UnstableApiUsage")
dependencies {
implementation("androidx.core:core-ktx:1.9.0")
androidTestImplementation("androidx.test:core:1.5.0")
androidTestImplementation("androidx.test.ext:junit-ktx:1.1.4")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test:runner:1.5.1")
androidTestImplementation("androidx.test:rules:1.5.0")
testImplementation("org.robolectric:robolectric:4.9")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4")
implementation(libs.androidx.core)
androidTestImplementation(libs.androidx.test)
androidTestImplementation(libs.androidx.test.ext)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.test.runner)
androidTestImplementation(libs.androidx.test.rules)
testImplementation(libs.org.robolectric)
testImplementation(libs.org.jetbrains.kotlinx.coroutines.test)
// Compose and navigation
implementation("androidx.compose.ui:ui:$composeVersion")
implementation("androidx.compose.ui:ui-tooling-preview:$composeVersion")
debugImplementation("androidx.compose.ui:ui-tooling:$composeVersion")
implementation("androidx.navigation:navigation-compose:2.5.3")
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.6.0-alpha03")
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.ui.tooling.preview)
debugImplementation(libs.androidx.compose.ui.tooling)
implementation(libs.androidx.navigation)
implementation(libs.androidx.lifecycle.runtime.compose)
// Material Design 3
implementation("androidx.compose.material3:material3:1.1.0-alpha03")
implementation(libs.androidx.compose.material3)
// Hilt and navigation
implementation("androidx.hilt:hilt-navigation-compose:1.0.0")
kapt("com.google.dagger:dagger-android-processor:2.44.2")
implementation("com.google.dagger:hilt-android:2.44.2")
kapt("com.google.dagger:hilt-compiler:2.44.2")
implementation(libs.androidx.hilt)
kapt(libs.com.google.dagger.processor)
implementation(libs.com.google.dagger.android)
kapt(libs.com.google.dagger.complier)
// There are a lot of icons
implementation("androidx.compose.material:material-icons-extended:$composeVersion")
implementation(libs.androidx.compose.material.icons.extended)
// DataStore
implementation("androidx.datastore:datastore-preferences:1.0.0")
implementation(libs.androidx.datastore)
// This is for system status bar color
implementation("com.google.accompanist:accompanist-systemuicontroller:0.27.1")
implementation(libs.com.google.accompanist.systemuicontroller)
// Firebase
"playStoreImplementation"(platform("com.google.firebase:firebase-bom:31.1.0"))
"playStoreImplementation"("com.google.firebase:firebase-analytics-ktx")
"playStoreImplementation"(platform(libs.com.google.firebase.bom))
// Crashlytics and Analytics
"playStoreImplementation"("com.google.firebase:firebase-crashlytics-ktx")
"playStoreImplementation"(libs.com.google.firebase.analytics)
"playStoreImplementation"(libs.com.google.firebase.crashlytics)
// Room
implementation("androidx.room:room-runtime:2.4.3")
implementation("androidx.room:room-ktx:2.4.3")
kapt("androidx.room:room-compiler:2.4.3")
implementation(libs.androidx.room.runtime)
implementation(libs.androidx.room.ktx)
kapt(libs.androidx.room.compiler)
// Moshi
implementation("com.squareup.moshi:moshi-kotlin:1.14.0")
implementation(libs.com.squareup.moshi)
// Retrofit with Moshi Converter
implementation("com.squareup.retrofit2:converter-moshi:2.9.0")
implementation(libs.com.squareup.retrofit2)
// Themmo
implementation("com.github.sadellie:themmo:cf6be7e592")
implementation(libs.com.github.sadellie.themmo)
// ComposeReorderable
implementation("org.burnoutcrew.composereorderable:reorderable:0.9.6")
implementation(libs.org.burnoutcrew.composereorderable)
// ExprK
implementation("com.github.sadellie:ExprK:e55cba8f41")
implementation(libs.com.github.sadellie.exprk)
}

View File

@ -5,15 +5,15 @@ buildscript {
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:7.3.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21")
classpath("com.google.dagger:hilt-android-gradle-plugin:2.44.2")
classpath(libs.com.android.tools.build)
classpath(libs.org.jetbrains.kotlin)
classpath(libs.com.google.dagger)
// Google services
classpath("com.google.gms:google-services:4.3.14")
classpath(libs.com.google.gms)
// Crashlytics
classpath("com.google.firebase:firebase-crashlytics-gradle:2.9.2")
classpath(libs.com.google.firebase)
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle.kts files

71
gradle/libs.versions.toml Normal file
View File

@ -0,0 +1,71 @@
[versions]
androidxCore = "1.9.0"
androidxTest = "1.5.0"
androidxTestExt = "1.1.4"
junit = "4.13.2"
androidxTestRunner = "1.5.1"
androidxTestRules = "1.5.0"
orgRobolectric = "4.9"
orgJetbrainsKotlinxCoroutinesTest = "1.6.4"
androidxComposeUi = "1.4.0-alpha03"
androidxNavigation = "2.5.3"
androidxLifecycleRuntimeCompose = "2.6.0-alpha03"
androidxComposeMaterial3 = "1.1.0-alpha03"
androidxHilt = "1.0.0"
comGoogleDagger = "2.44.2"
androidxComposeMaterialIconsExtended = "1.4.0-alpha03"
androidxDatastore = "1.0.0"
comGoogleAccompanist = "0.27.1"
androidxRoom = "2.4.3"
comSquareupMoshi = "1.14.0"
comSquareupRetrofit2 = "2.9.0"
comGithubSadellieThemmo = "cf6be7e592"
orgBurnoutcrewComposereorderable = "0.9.6"
comGithubSadellieExprk = "e55cba8f41"
firebaseBom = "31.1.0"
comAndroidToolsBuild = "7.3.1"
orgJetbrainsKotlin = "1.7.21"
comGoogleGms = "4.3.14"
comGoogleFirebase = "2.9.2"
[libraries]
androidx-core = { group = "androidx.core", name = "core-ktx", version.ref = "androidxCore" }
androidx-test = { group = "androidx.test", name = "core", version.ref = "androidxTest" }
androidx-test-ext = { group = "androidx.test.ext", name = "junit-ktx", version.ref = "androidxTestExt" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-test-runner = { group = "androidx.test", name = "runner", version.ref = "androidxTestRunner" }
androidx-test-rules = { group = "androidx.test", name = "rules", version.ref = "androidxTestRules" }
org-robolectric = { group = "org.robolectric", name = "robolectric", version.ref = "orgRobolectric" }
org-jetbrains-kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "orgJetbrainsKotlinxCoroutinesTest" }
androidx-compose-ui = { group = "androidx.compose.ui", name = "ui", version.ref = "androidxComposeUi" }
androidx-compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview", version.ref = "androidxComposeUi" }
androidx-compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling", version.ref = "androidxComposeUi" }
androidx-navigation = { group = "androidx.navigation", name = "navigation-compose", version.ref = "androidxNavigation" }
androidx-lifecycle-runtime-compose = { group = "androidx.lifecycle", name = "lifecycle-runtime-compose", version.ref = "androidxLifecycleRuntimeCompose" }
androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3", version.ref = "androidxComposeMaterial3" }
androidx-hilt = { group = "androidx.hilt", name = "hilt-navigation-compose", version.ref = "androidxHilt" }
com-google-dagger-processor = { group = "com.google.dagger", name = "dagger-android-processor", version.ref = "comGoogleDagger" }
com-google-dagger-android = { group = "com.google.dagger", name = "hilt-android", version.ref = "comGoogleDagger" }
com-google-dagger-complier = { group = "com.google.dagger", name = "hilt-compiler", version.ref = "comGoogleDagger" }
androidx-compose-material-icons-extended = { group = "androidx.compose.material", name = "material-icons-extended", version.ref = "androidxComposeMaterialIconsExtended" }
androidx-datastore = { group = "androidx.datastore", name = "datastore-preferences", version.ref = "androidxDatastore" }
com-google-accompanist-systemuicontroller = { group = "com.google.accompanist", name = "accompanist-systemuicontroller", version.ref = "comGoogleAccompanist" }
androidx-room-runtime = { group = "androidx.room", name = "room-runtime", version.ref = "androidxRoom" }
androidx-room-ktx = { group = "androidx.room", name = "room-ktx", version.ref = "androidxRoom" }
androidx-room-compiler = { group = "androidx.room", name = "room-compiler", version.ref = "androidxRoom" }
com-squareup-moshi = { group = "com.squareup.moshi", name = "moshi-kotlin", version.ref = "comSquareupMoshi" }
com-squareup-retrofit2 = { group = "com.squareup.retrofit2", name = "converter-moshi", version.ref = "comSquareupRetrofit2" }
com-github-sadellie-themmo = { group = "com.github.sadellie", name = "themmo", version.ref = "comGithubSadellieThemmo" }
org-burnoutcrew-composereorderable = { group = "org.burnoutcrew.composereorderable", name = "reorderable", version.ref = "orgBurnoutcrewComposereorderable" }
com-github-sadellie-exprk = { group = "com.github.sadellie", name = "ExprK", version.ref = "comGithubSadellieExprk" }
com-google-firebase-bom = { group = "com.google.firebase", name = "firebase-bom", version.ref = "firebaseBom" }
com-google-firebase-analytics = { group = "com.google.firebase", name = "firebase-analytics-ktx" }
com-google-firebase-crashlytics = { group = "com.google.firebase", name = "firebase-crashlytics-ktx" }
# classpath
com-android-tools-build = { group = "com.android.tools.build", name = "gradle", version.ref = "comAndroidToolsBuild" }
org-jetbrains-kotlin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "orgJetbrainsKotlin" }
com-google-dagger = { group = "com.google.dagger", name = "hilt-android-gradle-plugin", version.ref = "comGoogleDagger" }
com-google-gms = { group = "com.google.gms", name = "google-services", version.ref = "comGoogleGms" }
com-google-firebase = { group = "com.google.firebase", name = "firebase-crashlytics-gradle", version.ref = "comGoogleFirebase" }