Skip to content

Commit

Permalink
⬆️ Update android.plugin to v8 (major) (#146)
Browse files Browse the repository at this point in the history
* ⬆️ Update android.plugin to v8

* 🐛 Fix resource references

* 🔥 Remove BuildConfig from API

AGP 8+ doesn't generate the BuildConfig class by default anymore.

---------

Co-authored-by: Maxr1998 <[email protected]>
  • Loading branch information
Maxr1998-bot and Maxr1998 authored Sep 5, 2023
1 parent 2c6fb14 commit 7b11fe0
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[versions]
# Plugins
android-plugin = "7.4.2"
android-plugin = "8.1.1"
kotlin = "1.8.22"
binarycompatibilityvalidator = "0.13.2"
detekt = "1.21.0"
Expand Down
7 changes: 0 additions & 7 deletions library/api/library.api
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ public abstract class de/Maxr1998/modernpreferences/AbstractPreference {
public final fun setVisible (Z)V
}

public final class de/Maxr1998/modernpreferences/BuildConfig {
public static final field BUILD_TYPE Ljava/lang/String;
public static final field DEBUG Z
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String;
public fun <init> ()V
}

public class de/Maxr1998/modernpreferences/Preference : de/Maxr1998/modernpreferences/AbstractPreference {
public fun <init> (Ljava/lang/String;)V
public fun bindViews (Lde/Maxr1998/modernpreferences/PreferencesAdapter$ViewHolder;)V
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ class PreferencesAdapter @VisibleForTesting constructor(

init {
// Apply accent text color via theme attribute from library or fallback to AppCompat
val attrs = intArrayOf(R.attr.mapAccentTextColor, R.attr.colorAccent)
val attrs = intArrayOf(R.attr.mapAccentTextColor, androidx.appcompat.R.attr.colorAccent)
accentTextColor = itemView.context.theme.obtainStyledAttributes(attrs).use { array ->
// Return first resolved attribute or null
if (array.indexCount > 0) array.getColorStateList(array.getIndex(0)) else null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ internal class SelectionAdapter(

init {
// Apply accent text color via theme attribute from library or fallback to AppCompat
val attrs = intArrayOf(R.attr.mapAccentTextColor, R.attr.colorAccent)
val attrs = intArrayOf(R.attr.mapAccentTextColor, androidx.appcompat.R.attr.colorAccent)
accentTextColor = itemView.context.theme.obtainStyledAttributes(attrs).use { array ->
// Return first resolved attribute or null
if (array.indexCount > 0) array.getColorStateList(array.getIndex(0)) else null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ModernSeekBar(
attrs: AttributeSet?,
defStyleAttr: Int,
) : AppCompatSeekBar(context, attrs, defStyleAttr) {
constructor(context: Context, attrs: AttributeSet?) : this(context, attrs, R.attr.seekBarStyle)
constructor(context: Context, attrs: AttributeSet?) : this(context, attrs, androidx.appcompat.R.attr.seekBarStyle)
constructor(context: Context) : this(context, null)

private var tickMarkDrawable: Drawable? = null
Expand Down

0 comments on commit 7b11fe0

Please sign in to comment.