Skip to content

Commit

Permalink
Merge pull request #566 from code-payments/chore/desugar-api-module
Browse files Browse the repository at this point in the history
chore: desugar
  • Loading branch information
bmc08gt authored Sep 17, 2024
2 parents 13d3b3c + 8e8aa50 commit e25a52f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
12 changes: 0 additions & 12 deletions api/src/main/java/com/getcode/network/exchange/Exchange.kt
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
package com.getcode.network.exchange

import android.annotation.SuppressLint
import com.getcode.db.Database
import com.getcode.model.Currency
import com.getcode.model.CurrencyCode
import com.getcode.model.PrefsString
import com.getcode.model.Rate
import com.getcode.network.api.CurrencyApi
import com.getcode.network.core.NetworkOracle
import com.getcode.network.repository.PrefRepository
import com.getcode.network.service.ApiRateResult
import com.getcode.network.service.CurrencyService
import com.getcode.utils.ErrorUtils
import com.getcode.utils.TraceType
import com.getcode.utils.format
import com.getcode.utils.network.retryable
Expand All @@ -26,17 +21,10 @@ import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.mapNotNull
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch
import kotlinx.coroutines.suspendCancellableCoroutine
import kotlinx.datetime.Instant
import timber.log.Timber
import java.util.Date
import javax.inject.Inject
import kotlin.coroutines.resume
import kotlin.coroutines.resumeWithException
import kotlin.time.Duration.Companion.convert
import kotlin.time.Duration.Companion.minutes
import kotlin.time.DurationUnit
import kotlin.time.ExperimentalTime

interface Exchange {
val localRate: Rate
Expand Down
3 changes: 3 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ android {
compileOptions {
sourceCompatibility(Versions.java)
targetCompatibility(Versions.java)
isCoreLibraryDesugaringEnabled = true
}

java {
Expand Down Expand Up @@ -122,6 +123,8 @@ dependencies {
implementation(project(":common:theme"))
implementation(project(":vendor:tipkit:tipkit-m2"))

coreLibraryDesugaring(Libs.android_desugaring)

//standard libraries
implementation(Libs.kotlinx_collections_immutable)
implementation(Libs.kotlinx_serialization_json)
Expand Down
3 changes: 3 additions & 0 deletions buildSrc/src/main/java/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ object Versions {
const val protobuf_plugin = "0.9.4"

const val sodium_bindings = "0.9.0"

const val desugaring = "2.1.2"
}

object Classpath {
Expand Down Expand Up @@ -134,6 +136,7 @@ object Plugins {
}

object Libs {
const val android_desugaring = "com.android.tools:desugar_jdk_libs:${Versions.desugaring}"
const val androidx_activity = "androidx.activity:activity-ktx:{${Versions.androidx_activity}"
const val androidx_annotation = "androidx.annotation:annotation:${Versions.androidx_annotation}"
const val androidx_biometrics = "androidx.biometric:biometric:${Versions.androidx_biometrics}"
Expand Down

0 comments on commit e25a52f

Please sign in to comment.