Skip to content

Commit

Permalink
Use version catelog and update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
kylecorry31 committed Mar 24, 2024
1 parent 8b082cf commit 9aee4fe
Show file tree
Hide file tree
Showing 10 changed files with 170 additions and 79 deletions.
132 changes: 63 additions & 69 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -102,83 +102,77 @@ android {

dependencies {
// Kotlin
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0")
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4")
implementation(libs.kotlinx.coroutines.android)
coreLibraryDesugaring(libs.desugar.jdk.libs)

// AndroidX
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.gridlayout:gridlayout:1.0.0")
implementation("androidx.preference:preference-ktx:1.2.1")
implementation("androidx.work:work-runtime-ktx:2.9.0")
val navVersion = "2.7.7"
implementation("androidx.navigation:navigation-fragment-ktx:$navVersion")
implementation("androidx.navigation:navigation-ui-ktx:$navVersion")
implementation("androidx.legacy:legacy-support-v4:1.0.0")
val roomVersion = "2.6.1"
ksp("androidx.room:room-compiler:$roomVersion")
implementation("androidx.room:room-runtime:$roomVersion")
implementation("androidx.room:room-ktx:$roomVersion")
val lifecycleVersion = "2.7.0"
implementation("androidx.lifecycle:lifecycle-service:$lifecycleVersion")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion")
val cameraxVersion = "1.3.2"
implementation("androidx.camera:camera-camera2:$cameraxVersion")
implementation("androidx.camera:camera-lifecycle:$cameraxVersion")
implementation("androidx.camera:camera-view:$cameraxVersion")
implementation(libs.constraintlayout)
implementation(libs.appcompat)
implementation(libs.core.ktx)
implementation(libs.gridlayout)
implementation(libs.preference.ktx)
implementation(libs.work.runtime.ktx)
implementation(libs.navigation.fragment.ktx)
implementation(libs.navigation.ui.ktx)
implementation(libs.legacy.support.v4)
ksp(libs.room.compiler)
implementation(libs.room.runtime)
implementation(libs.room.ktx)
implementation(libs.lifecycle.service)
implementation(libs.lifecycle.viewmodel.ktx)
implementation(libs.camera.camera2)
implementation(libs.camera.lifecycle)
implementation(libs.camera.view)

// Material
implementation("com.google.android.material:material:1.10.0")
implementation("com.google.android.flexbox:flexbox:3.0.0")
implementation(libs.material)
implementation(libs.flexbox)

// Andromeda
val andromedaVersion = "04ed557cda"
implementation("com.github.kylecorry31.andromeda:core:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:fragments:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:forms:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:csv:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:background:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:camera:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:gpx:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:sound:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:sense:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:signal:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:preferences:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:permissions:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:canvas:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:files:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:notify:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:alerts:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:pickers:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:list:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:qr:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:markdown:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:camera:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:clipboard:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:buzz:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:torch:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:battery:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:compression:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:pdf:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:exceptions:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:print:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:list:$andromedaVersion")
implementation("com.github.kylecorry31.andromeda:views:$andromedaVersion")
implementation(libs.andromeda.core)
implementation(libs.andromeda.fragments)
implementation(libs.andromeda.forms)
implementation(libs.andromeda.csv)
implementation(libs.andromeda.background)
implementation(libs.andromeda.camera)
implementation(libs.andromeda.gpx)
implementation(libs.andromeda.sound)
implementation(libs.andromeda.sense)
implementation(libs.andromeda.signal)
implementation(libs.andromeda.preferences)
implementation(libs.andromeda.permissions)
implementation(libs.andromeda.canvas)
implementation(libs.andromeda.files)
implementation(libs.andromeda.notify)
implementation(libs.andromeda.alerts)
implementation(libs.andromeda.pickers)
implementation(libs.andromeda.list)
implementation(libs.andromeda.qr)
implementation(libs.andromeda.markdown)
implementation(libs.andromeda.camera)
implementation(libs.andromeda.clipboard)
implementation(libs.andromeda.buzz)
implementation(libs.andromeda.torch)
implementation(libs.andromeda.battery)
implementation(libs.andromeda.compression)
implementation(libs.andromeda.pdf)
implementation(libs.andromeda.exceptions)
implementation(libs.andromeda.print)
implementation(libs.andromeda.list)
implementation(libs.andromeda.views)

// Misc
implementation("com.github.kylecorry31:subsampling-scale-image-view:3.11.9")
implementation("com.github.kylecorry31:sol:9.4.0")
implementation("com.github.kylecorry31:luna:bf2f3d68cc")
// debugImplementation("com.squareup.leakcanary:leakcanary-android:2.12")
implementation(libs.subsampling.scale.image.view)
implementation(libs.sol)
implementation(libs.luna)

// Testing
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
testImplementation("org.junit.platform:junit-platform-runner:1.10.2")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.2")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.10.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.2")
testImplementation("org.mockito.kotlin:mockito-kotlin:5.1.0")
testImplementation(libs.junit)
androidTestImplementation(libs.ext.junit)
androidTestImplementation(libs.espresso.core)
testImplementation(libs.junit.platform.runner)
testImplementation(libs.junit.jupiter.api)
testImplementation(libs.junit.jupiter.params)
testRuntimeOnly(libs.junit.jupiter.engine)
testImplementation(libs.mockito.kotlin)
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.kylecorry.trail_sense.shared.declination

import com.kylecorry.andromeda.sense.location.IGPS
import com.kylecorry.luna.cache.Hooks
import com.kylecorry.luna.hooks.Hooks
import com.kylecorry.sol.science.geology.Geology
import com.kylecorry.sol.science.geology.IGeologyService
import com.kylecorry.sol.units.Distance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import com.kylecorry.andromeda.core.ui.Colors.withAlpha
import com.kylecorry.andromeda.core.units.PixelCoordinate
import com.kylecorry.andromeda.fragments.inBackground
import com.kylecorry.andromeda.sense.Sensors
import com.kylecorry.luna.cache.Hooks
import com.kylecorry.luna.hooks.Hooks
import com.kylecorry.luna.coroutines.CoroutineQueueRunner
import com.kylecorry.sol.math.Euler
import com.kylecorry.sol.math.Quaternion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import android.graphics.Color
import com.kylecorry.andromeda.canvas.ICanvasDrawer
import com.kylecorry.andromeda.core.ui.Colors.withAlpha
import com.kylecorry.andromeda.core.units.PixelCoordinate
import com.kylecorry.luna.cache.Hooks
import com.kylecorry.luna.hooks.Hooks
import com.kylecorry.luna.coroutines.CoroutineQueueRunner
import com.kylecorry.sol.science.astronomy.Astronomy
import com.kylecorry.sol.science.astronomy.moon.MoonPhase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.kylecorry.trail_sense.tools.augmented_reality.ui.layers

import com.kylecorry.andromeda.canvas.ICanvasDrawer
import com.kylecorry.andromeda.core.units.PixelCoordinate
import com.kylecorry.luna.cache.Hooks
import com.kylecorry.luna.hooks.Hooks
import com.kylecorry.sol.math.SolMath.square
import com.kylecorry.sol.math.Vector2
import com.kylecorry.sol.math.geometry.Rectangle
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.kylecorry.trail_sense.tools.cliffheight.domain

import com.kylecorry.luna.cache.Hooks
import com.kylecorry.luna.hooks.Hooks
import com.kylecorry.sol.science.geology.Geology
import com.kylecorry.sol.science.physics.PhysicsService
import com.kylecorry.sol.units.Coordinate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.kylecorry.trail_sense.tools.maps.domain

import com.kylecorry.luna.cache.Hooks
import com.kylecorry.luna.hooks.Hooks
import com.kylecorry.sol.math.SolMath.roundNearestAngle
import com.kylecorry.sol.math.Vector2
import com.kylecorry.sol.math.geometry.Size
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import androidx.lifecycle.LifecycleEventObserver
import androidx.lifecycle.findViewTreeLifecycleOwner
import com.kylecorry.andromeda.core.time.CoroutineTimer
import com.kylecorry.andromeda.fragments.AndromedaFragment
import com.kylecorry.luna.cache.Hooks
import com.kylecorry.luna.hooks.Hooks
import com.kylecorry.sol.units.Bearing
import com.kylecorry.sol.units.Coordinate
import com.kylecorry.trail_sense.R
Expand Down
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id("com.android.application") version "8.3.1" apply false
id("com.google.devtools.ksp") version "1.9.21-1.0.15" apply false
id("org.jetbrains.kotlin.android") version "1.9.21" apply false
alias(libs.plugins.android.application) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.kotlin.android) apply false
}

task("clean") {
Expand Down
97 changes: 97 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
[versions]
androidApplication = "8.3.1"
andromedaVersion = "6fdcd0df89"
cameraxVersion = "1.3.2"
coreKtx = "1.12.0"
appcompat = "1.6.1"
constraintlayout = "2.1.4"
desugar_jdk_libs = "2.0.4"
espressoCore = "3.5.1"
flexbox = "3.0.0"
gridlayout = "1.0.0"
junitJupiter = "5.10.2"
junitPlatformRunner = "1.10.2"
junitVersion = "1.1.5"
junit = "4.13.2"
kotlinAndroidVersion = "1.9.21"
kotlinxCoroutinesAndroid = "1.8.0"
ksp = "1.9.21-1.0.15"
legacySupportV4 = "1.0.0"
navVersion = "2.7.7"
lifecycleVersion = "2.7.0"
material = "1.10.0"
luna = "0.3.3"
mockitoKotlin = "5.1.0"
roomVersion = "2.6.1"
sol = "9.4.0"
subsamplingScaleImageView = "3.11.9"
workRuntimeKtx = "2.9.0"
preferenceKtx = "1.2.1"

[libraries]
andromeda-battery = { module = "com.github.kylecorry31.andromeda:battery", version.ref = "andromedaVersion" }
andromeda-buzz = { module = "com.github.kylecorry31.andromeda:buzz", version.ref = "andromedaVersion" }
andromeda-clipboard = { module = "com.github.kylecorry31.andromeda:clipboard", version.ref = "andromedaVersion" }
andromeda-exceptions = { module = "com.github.kylecorry31.andromeda:exceptions", version.ref = "andromedaVersion" }
andromeda-compression = { module = "com.github.kylecorry31.andromeda:compression", version.ref = "andromedaVersion" }
andromeda-markdown = { module = "com.github.kylecorry31.andromeda:markdown", version.ref = "andromedaVersion" }
andromeda-list = { module = "com.github.kylecorry31.andromeda:list", version.ref = "andromedaVersion" }
andromeda-alerts = { module = "com.github.kylecorry31.andromeda:alerts", version.ref = "andromedaVersion" }
andromeda-notify = { module = "com.github.kylecorry31.andromeda:notify", version.ref = "andromedaVersion" }
andromeda-files = { module = "com.github.kylecorry31.andromeda:files", version.ref = "andromedaVersion" }
andromeda-canvas = { module = "com.github.kylecorry31.andromeda:canvas", version.ref = "andromedaVersion" }
andromeda-core = { module = "com.github.kylecorry31.andromeda:core", version.ref = "andromedaVersion" }
andromeda-pdf = { module = "com.github.kylecorry31.andromeda:pdf", version.ref = "andromedaVersion" }
andromeda-permissions = { module = "com.github.kylecorry31.andromeda:permissions", version.ref = "andromedaVersion" }
andromeda-pickers = { module = "com.github.kylecorry31.andromeda:pickers", version.ref = "andromedaVersion" }
andromeda-preferences = { module = "com.github.kylecorry31.andromeda:preferences", version.ref = "andromedaVersion" }
andromeda-print = { module = "com.github.kylecorry31.andromeda:print", version.ref = "andromedaVersion" }
andromeda-qr = { module = "com.github.kylecorry31.andromeda:qr", version.ref = "andromedaVersion" }
andromeda-signal = { module = "com.github.kylecorry31.andromeda:signal", version.ref = "andromedaVersion" }
andromeda-sense = { module = "com.github.kylecorry31.andromeda:sense", version.ref = "andromedaVersion" }
andromeda-sound = { module = "com.github.kylecorry31.andromeda:sound", version.ref = "andromedaVersion" }
andromeda-gpx = { module = "com.github.kylecorry31.andromeda:gpx", version.ref = "andromedaVersion" }
andromeda-camera = { module = "com.github.kylecorry31.andromeda:camera", version.ref = "andromedaVersion" }
andromeda-background = { module = "com.github.kylecorry31.andromeda:background", version.ref = "andromedaVersion" }
andromeda-csv = { module = "com.github.kylecorry31.andromeda:csv", version.ref = "andromedaVersion" }
andromeda-forms = { module = "com.github.kylecorry31.andromeda:forms", version.ref = "andromedaVersion" }
andromeda-fragments = { module = "com.github.kylecorry31.andromeda:fragments", version.ref = "andromedaVersion" }
andromeda-torch = { module = "com.github.kylecorry31.andromeda:torch", version.ref = "andromedaVersion" }
andromeda-views = { module = "com.github.kylecorry31.andromeda:views", version.ref = "andromedaVersion" }
camera-view = { module = "androidx.camera:camera-view", version.ref = "cameraxVersion" }
camera-lifecycle = { module = "androidx.camera:camera-lifecycle", version.ref = "cameraxVersion" }
camera-camera2 = { module = "androidx.camera:camera-camera2", version.ref = "cameraxVersion" }
core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" }
desugar_jdk_libs = { module = "com.android.tools:desugar_jdk_libs", version.ref = "desugar_jdk_libs" }
espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espressoCore" }
ext-junit = { module = "androidx.test.ext:junit", version.ref = "junitVersion" }
flexbox = { module = "com.google.android.flexbox:flexbox", version.ref = "flexbox" }
gridlayout = { module = "androidx.gridlayout:gridlayout", version.ref = "gridlayout" }
junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junitJupiter" }
junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "junitJupiter" }
junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junitJupiter" }
junit-platform-runner = { module = "org.junit.platform:junit-platform-runner", version.ref = "junitPlatformRunner" }
junit = { module = "junit:junit", version.ref = "junit" }
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinxCoroutinesAndroid" }
legacy-support-v4 = { module = "androidx.legacy:legacy-support-v4", version.ref = "legacySupportV4" }
lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleVersion" }
lifecycle-service = { module = "androidx.lifecycle:lifecycle-service", version.ref = "lifecycleVersion" }
luna = { module = "com.github.kylecorry31:luna", version.ref = "luna" }
material = { module = "com.google.android.material:material", version.ref = "material" }
mockito-kotlin = { module = "org.mockito.kotlin:mockito-kotlin", version.ref = "mockitoKotlin" }
navigation-ui-ktx = { module = "androidx.navigation:navigation-ui-ktx", version.ref = "navVersion" }
navigation-fragment-ktx = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "navVersion" }
room-ktx = { module = "androidx.room:room-ktx", version.ref = "roomVersion" }
room-runtime = { module = "androidx.room:room-runtime", version.ref = "roomVersion" }
room-compiler = { module = "androidx.room:room-compiler", version.ref = "roomVersion" }
sol = { module = "com.github.kylecorry31:sol", version.ref = "sol" }
subsampling-scale-image-view = { module = "com.github.kylecorry31:subsampling-scale-image-view", version.ref = "subsamplingScaleImageView" }
work-runtime-ktx = { module = "androidx.work:work-runtime-ktx", version.ref = "workRuntimeKtx" }
preference-ktx = { module = "androidx.preference:preference-ktx", version.ref = "preferenceKtx" }

[plugins]
android-application = { id = "com.android.application", version.ref = "androidApplication" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlinAndroidVersion" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }

0 comments on commit 9aee4fe

Please sign in to comment.