From f4c4e0b7aa10708896814272bf2c51c4ef94c6f9 Mon Sep 17 00:00:00 2001 From: Yash-Garg Date: Sat, 4 Mar 2023 09:08:08 +0530 Subject: [PATCH] fix: cleanup deps and remove desugaring --- app/build.gradle.kts | 6 ++---- app/proguard-rules.pro | 9 +++++++++ .../main/kotlin/dev/yashgarg/qbit/utils/NumberFormat.kt | 1 + gradle/libs.versions.toml | 6 ------ 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 64ed2380..ca9dda91 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -26,8 +26,8 @@ android { applicationId = "dev.yashgarg.qbit" minSdk = 24 targetSdk = 33 - versionCode = 11 - versionName = "v0.2.0-$commitHash" + versionCode = 12 + versionName = "v0.2.1-$commitHash" multiDexEnabled = true testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" @@ -37,7 +37,6 @@ android { compileOptions { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 - isCoreLibraryDesugaringEnabled = true } val isGithubCi = System.getenv("GITHUB_CI") != null @@ -148,5 +147,4 @@ dependencies { implementation(libs.tools.whatthestack) testImplementation(libs.bundles.testing) - coreLibraryDesugaring(libs.tools.desugar) } diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 0cdda9fa..8e3f1fb3 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -43,3 +43,12 @@ # @Serializable and @Polymorphic are used at runtime for polymorphic serialization. -keepattributes RuntimeVisibleAnnotations,AnnotationDefault + +# Don't print notes about potential mistakes or omissions in the configuration for kotlinx-serialization classes +# See also https://github.com/Kotlin/kotlinx.serialization/issues/1900 +-dontnote kotlinx.serialization.** + +# Serialization core uses `java.lang.ClassValue` for caching inside these specified classes. +# If there is no `java.lang.ClassValue` (for example, in Android), then R8/ProGuard will print a warning. +# However, since in this case they will not be used, we can disable these warnings +-dontwarn kotlinx.serialization.internal.ClassValueReferences \ No newline at end of file diff --git a/app/src/main/kotlin/dev/yashgarg/qbit/utils/NumberFormat.kt b/app/src/main/kotlin/dev/yashgarg/qbit/utils/NumberFormat.kt index d541423d..99c7524e 100644 --- a/app/src/main/kotlin/dev/yashgarg/qbit/utils/NumberFormat.kt +++ b/app/src/main/kotlin/dev/yashgarg/qbit/utils/NumberFormat.kt @@ -1,5 +1,6 @@ package dev.yashgarg.qbit.utils +import java.lang.StringBuilder import java.text.CharacterIterator import java.text.StringCharacterIterator import java.time.Instant diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 41a5122d..3cb34007 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -72,17 +72,11 @@ kotlinx-serialization = { module = "org.jetbrains.kotlinx:kotlinx-serialization- ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" } ktor-client-logging = { module = "io.ktor:ktor-client-logging", version.ref = "ktor" } ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" } -ktor-client-js = { module = "io.ktor:ktor-client-js", version.ref = "ktor" } -ktor-client-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor" } -ktor-client-darwin = { module = "io.ktor:ktor-client-darwin", version.ref = "ktor" } -ktor-client-winhttp = { module = "io.ktor:ktor-client-winhttp", version.ref = "ktor" } ktor-client-contentNegotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" } -ktor-client-curl = { module = "io.ktor:ktor-client-curl", version.ref = "ktor" } ktor-serialization = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" } tools-leakcanary = "com.squareup.leakcanary:leakcanary-android:2.10" tools-cascade = "me.saket.cascade:cascade:1.3.0" -tools-desugar = "com.android.tools:desugar_jdk_libs:2.0.2" tools-kotlin-result = "com.michael-bull.kotlin-result:kotlin-result:1.1.16" tools-lottie = "com.airbnb.android:lottie:6.0.0" tools-whatthestack = "com.github.haroldadmin:WhatTheStack:1.0.0-alpha04"