Merge pull request #1675 from tomaThomas/proguard-rules

Proguard rules
This commit is contained in:
Hemanth Savarala 2024-10-19 23:01:15 +05:30 committed by GitHub
commit 3ad2409956
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 11 additions and 37 deletions

View file

@ -57,6 +57,7 @@ android {
buildFeatures {
viewBinding true
buildConfig true
}
packagingOptions {
resources {

View file

@ -69,3 +69,8 @@
-keep class code.name.monkey.retromusic.network.model.** { *; }
-keep class code.name.monkey.retromusic.model.** { *; }
-keep class com.google.android.material.bottomsheet.** { *; }
# TypeToken https://stackoverflow.com/questions/70969756/caused-by-java-lang-runtimeexception-missing-type-parameter
-keep class com.google.gson.reflect.TypeToken
-keep class * extends com.google.gson.reflect.TypeToken
-keep public class * implements java.lang.reflect.Type

View file

@ -19,3 +19,5 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-keep class code.name.monkey.appthemehelper.** { *; }

View file

@ -1,33 +0,0 @@
package code.name.monkey.appthemehelper.util
import android.content.res.ColorStateList
import androidx.annotation.ColorInt
import com.google.android.material.textfield.TextInputLayout
/**
* @author Aidan Follestad (afollestad)
*/
object TextInputLayoutUtil {
fun setHint(view: TextInputLayout, @ColorInt hintColor: Int) {
try {
val mDefaultTextColorField = TextInputLayout::class.java.getDeclaredField("mDefaultTextColor")
mDefaultTextColorField.isAccessible = true
mDefaultTextColorField.set(view, ColorStateList.valueOf(hintColor))
} catch (t: Throwable) {
throw RuntimeException("Failed to set TextInputLayout hint (collapsed) color: " + t.localizedMessage, t)
}
}
fun setAccent(view: TextInputLayout, @ColorInt accentColor: Int) {
try {
val mFocusedTextColorField = TextInputLayout::class.java.getDeclaredField("mFocusedTextColor")
mFocusedTextColorField.isAccessible = true
mFocusedTextColorField.set(view, ColorStateList.valueOf(accentColor))
} catch (t: Throwable) {
throw RuntimeException("Failed to set TextInputLayout accent (expanded) color: " + t.localizedMessage, t)
}
}
}

View file

@ -12,5 +12,4 @@ android.nonTransitiveRClass=true
kotlin.incremental.useClasspathSnapshot=true
# https://docs.gradle.org/7.5/userguide/configuration_cache.html
org.gradle.unsafe.configuration-cache=true
android.defaults.buildfeatures.buildconfig=true
android.nonFinalResIds=false

View file

@ -9,7 +9,7 @@ coreSplashscreen = "1.0.0"
customactivityoncrash = "2.4.0"
fadingedgelayout = "1.0.0"
google_featureDelivery_version = "2.1.0"
gradle = "8.5.1"
gradle = "8.7.1"
dhaval2404_imagepicker_version = "2.1"
chrisbanes_insetter_version = "0.6.1"
jaudiotagger = "2.3.15"

View file

@ -1,6 +1,6 @@
#Mon Mar 06 21:09:43 IST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists