Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: desugar #566

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading