Skip to content

Commit

Permalink
Use Gradle Version Catalog (#128)
Browse files Browse the repository at this point in the history
* Migrate to gradle kts

* Extract dependencies into gradle catalog

* Update plugins

* Revert uneeded change

* Remove space

* Update version name
  • Loading branch information
hieuwu authored Oct 17, 2024
1 parent 8eafad7 commit 9edf1f8
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 37 deletions.
75 changes: 38 additions & 37 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -105,55 +105,56 @@ dependencies {
implementation(project(":fiaticons"))
implementation(project(":cryptoicons"))

implementation("dev.arkbuilders.components:about:0.1.1")
implementation("androidx.compose.ui:ui:1.6.8")
implementation("androidx.navigation:navigation-compose:2.7.7")
implementation("androidx.compose.material3:material3:1.2.1")
implementation("androidx.compose.ui:ui-tooling-preview:1.6.8")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.4")
implementation("androidx.activity:activity-compose:1.9.1")
implementation("androidx.constraintlayout:constraintlayout-compose:1.0.1")
implementation(libs.ark.about)
implementation(libs.androidx.ui)

implementation("com.google.dagger:dagger:2.50")
implementation("androidx.glance:glance-appwidget:1.1.0")
ksp("com.google.dagger:dagger-compiler:2.50")
implementation(libs.navigation.compose)
implementation(libs.material3)
implementation(libs.androidx.ui.tooling.preview)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.activity.compose)
implementation(libs.constraintlayout.compose)

implementation("androidx.room:room-runtime:2.6.1")
implementation("androidx.room:room-ktx:2.6.1")
ksp("androidx.room:room-compiler:2.6.1")
implementation(libs.dagger)
implementation(libs.androidx.glance.appwidget)
ksp(libs.dagger.compiler)

implementation("androidx.datastore:datastore-preferences:1.1.1")
implementation(libs.androidx.room.runtime)
implementation(libs.androidx.room.ktx)
ksp(libs.androidx.room.compiler)

implementation("com.jakewharton.timber:timber:5.0.1")
implementation(libs.androidx.datastore.preferences)

implementation("androidx.work:work-runtime-ktx:2.8.1")
implementation("io.github.oleksandrbalan:tagcloud:1.1.0")
implementation(libs.timber)

implementation("org.orbit-mvi:orbit-compose:4.6.1")
implementation("org.orbit-mvi:orbit-viewmodel:6.1.0")
implementation(libs.androidx.work.runtime.ktx)
implementation(libs.tagcloud)

implementation("io.arrow-kt:arrow-core:1.2.1")
implementation("io.arrow-kt:arrow-fx-coroutines:1.2.1")
implementation(libs.orbit.compose)
implementation(libs.orbit.viewmodel)

implementation("com.github.androidmads:QRGenerator:1.0.1")
implementation(libs.arrow.core)
implementation(libs.arrow.fx.coroutines)

implementation("io.github.raamcosta.compose-destinations:animations-core:1.9.62")
ksp("io.github.raamcosta.compose-destinations:ksp:1.9.62")
implementation(libs.qrgenerator)

implementation("com.squareup.retrofit2:retrofit:2.11.0")
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
implementation(libs.compose.destinations.animations)
ksp(libs.compose.destinations.compiler)

implementation(platform("com.google.firebase:firebase-bom:33.1.2"))
implementation("com.google.firebase:firebase-analytics-ktx")
implementation("com.google.firebase:firebase-crashlytics-ktx")
implementation(libs.retrofit)
implementation(libs.converter.gson)
implementation(libs.logging.interceptor)

testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.6.8")
debugImplementation("androidx.compose.ui:ui-tooling:1.6.8")
debugImplementation("androidx.compose.ui:ui-test-manifest:1.6.8")
implementation(platform(libs.firebase.bom))
implementation(libs.firebase.analytics)
implementation(libs.firebase.crashlytics)

testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(libs.androidx.ui.test.junit4)
debugImplementation(libs.androidx.ui.tooling)
debugImplementation(libs.androidx.ui.test.manifest)
}

ktlint {
Expand Down
72 changes: 72 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
[versions]
arkAbout = "0.1.1"
activityCompose = "1.9.2"
composeDestinationsVersion = "1.9.62"
arrowFxCoroutines = "1.2.1"
arrowCore = "1.2.1"
constraintlayoutCompose = "1.0.1"
converterGson = "2.9.0"
dagger = "2.50"
datastorePreferences = "1.1.1"
espressoCore = "3.6.1"
firebaseBom = "33.1.2"
glanceAppwidget = "1.1.0"
junit = "4.13.2"
junitVersion = "1.2.1"
lifecycleRuntimeKtx = "2.8.6"
loggingInterceptor = "4.12.0"
material3 = "1.2.1"
navigationComposeVersion = "2.8.2"
orbitCompose = "4.6.1"
orbitViewmodel = "6.1.0"
qrgenerator = "1.0.1"
retrofit = "2.11.0"
roomRuntime = "2.6.1"
tagcloud = "1.1.0"
timber = "5.0.1"
composeUi = "1.6.8"
workRuntimeKtx = "2.8.1"

[libraries]
ark-about = { module = "dev.arkbuilders.components:about", version.ref = "arkAbout" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" }
androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "datastorePreferences" }
androidx-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espressoCore" }
androidx-glance-appwidget = { module = "androidx.glance:glance-appwidget", version.ref = "glanceAppwidget" }
androidx-junit = { module = "androidx.test.ext:junit", version.ref = "junitVersion" }
androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "roomRuntime" }
androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "roomRuntime" }
androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "roomRuntime" }

androidx-ui = { module = "androidx.compose.ui:ui", version.ref = "composeUi" }
androidx-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "composeUi" }
androidx-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "composeUi" }
androidx-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "composeUi" }
androidx-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "composeUi" }

androidx-work-runtime-ktx = { module = "androidx.work:work-runtime-ktx", version.ref = "workRuntimeKtx" }
compose-destinations-animations = { module = "io.github.raamcosta.compose-destinations:animations-core", version.ref = "composeDestinationsVersion" }
compose-destinations-compiler = { module = "io.github.raamcosta.compose-destinations:ksp", version.ref = "composeDestinationsVersion" }

arrow-fx-coroutines = { module = "io.arrow-kt:arrow-fx-coroutines", version.ref = "arrowFxCoroutines" }
arrow-core = { module = "io.arrow-kt:arrow-core", version.ref = "arrowCore" }
constraintlayout-compose = { module = "androidx.constraintlayout:constraintlayout-compose", version.ref = "constraintlayoutCompose" }
converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "converterGson" }
dagger = { module = "com.google.dagger:dagger", version.ref = "dagger" }
dagger-compiler = { module = "com.google.dagger:dagger-compiler", version.ref = "dagger" }

firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "firebaseBom" }
firebase-analytics = { module = "com.google.firebase:firebase-analytics-ktx", version = "" }
firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics-ktx", version = "" }

junit = { module = "junit:junit", version.ref = "junit" }
logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "loggingInterceptor" }
material3 = { module = "androidx.compose.material3:material3", version.ref = "material3" }
navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigationComposeVersion" }
orbit-compose = { module = "org.orbit-mvi:orbit-compose", version.ref = "orbitCompose" }
orbit-viewmodel = { module = "org.orbit-mvi:orbit-viewmodel", version.ref = "orbitViewmodel" }
qrgenerator = { module = "com.github.androidmads:QRGenerator", version.ref = "qrgenerator" }
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
tagcloud = { module = "io.github.oleksandrbalan:tagcloud", version.ref = "tagcloud" }
timber = { module = "com.jakewharton.timber:timber", version.ref = "timber" }

0 comments on commit 9edf1f8

Please sign in to comment.