Skip to content
This repository was archived by the owner on Jun 12, 2025. It is now read-only.

Commit ece88f9

Browse files
Upgraded dependencies
1 parent e832584 commit ece88f9

9 files changed

Lines changed: 40 additions & 19 deletions

File tree

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ buildscript {
55
mavenCentral()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:7.0.4'
9-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21"
10-
classpath 'io.github.gradle-nexus:publish-plugin:1.1.0'
8+
classpath 'com.android.tools.build:gradle:8.1.1'
9+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10"
10+
classpath 'io.github.gradle-nexus:publish-plugin:1.3.0'
1111
}
1212
}
1313

drag-drop-swipe-recyclerview-sample/build.gradle

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
33

44
android {
5-
compileSdkVersion 31
5+
compileSdk 34
66

77
defaultConfig {
88
applicationId "com.ernestoyaquello.dragdropswiperecyclerviewsample"
99
minSdkVersion 19
10-
targetSdkVersion 31
10+
targetSdkVersion 34
1111
versionCode 1
1212
versionName "1.0"
1313
}
@@ -22,13 +22,20 @@ android {
2222
buildFeatures {
2323
viewBinding true
2424
}
25+
26+
compileOptions {
27+
sourceCompatibility JavaVersion.VERSION_17
28+
targetCompatibility JavaVersion.VERSION_17
29+
}
30+
31+
namespace 'com.ernestoyaquello.dragdropswiperecyclerviewsample'
2532
}
2633

2734
dependencies {
2835
implementation fileTree(dir: 'libs', include: ['*.jar'])
2936

30-
implementation 'com.google.android.material:material:1.4.0'
31-
implementation 'androidx.appcompat:appcompat:1.4.0'
37+
implementation 'com.google.android.material:material:1.9.0'
38+
implementation 'androidx.appcompat:appcompat:1.6.1'
3239
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
3340
implementation 'androidx.cardview:cardview:1.0.0'
3441

drag-drop-swipe-recyclerview-sample/src/main/AndroidManifest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.ernestoyaquello.dragdropswiperecyclerviewsample">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
65
android:allowBackup="true"
@@ -12,7 +11,6 @@
1211

1312
<activity
1413
android:name=".MainActivity"
15-
android:label="@string/app_name"
1614
android:exported="true">
1715
<intent-filter>
1816
<action android:name="android.intent.action.MAIN" />

drag-drop-swipe-recyclerview/build.gradle

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@ apply plugin: 'com.android.library'
22
apply plugin: 'kotlin-android'
33

44
android {
5-
compileSdkVersion 31
5+
compileSdk 34
66

77
defaultConfig {
88
minSdkVersion 19
9-
targetSdkVersion 31
10-
versionCode 18
11-
versionName '1.1.1'
9+
targetSdkVersion 34
1210
}
1311

1412
buildTypes {
@@ -17,11 +15,18 @@ android {
1715
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
1816
}
1917
}
18+
19+
compileOptions {
20+
sourceCompatibility JavaVersion.VERSION_17
21+
targetCompatibility JavaVersion.VERSION_17
22+
}
23+
24+
namespace 'com.ernestoyaquello.dragdropswiperecyclerview'
2025
}
2126

2227
dependencies {
23-
implementation 'androidx.appcompat:appcompat:1.4.0'
24-
api 'androidx.recyclerview:recyclerview:1.2.1'
28+
implementation 'androidx.appcompat:appcompat:1.6.1'
29+
api 'androidx.recyclerview:recyclerview:1.3.1'
2530
}
2631

2732
ext {

drag-drop-swipe-recyclerview/src/main/AndroidManifest.xml

Lines changed: 0 additions & 1 deletion
This file was deleted.

drag-drop-swipe-recyclerview/src/main/java/com/ernestoyaquello/dragdropswiperecyclerview/DragDropSwipeRecyclerView.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ package com.ernestoyaquello.dragdropswiperecyclerview
33
import android.content.Context
44
import android.graphics.Color
55
import android.graphics.drawable.Drawable
6+
import android.os.Build
7+
import android.os.Build.VERSION.SDK_INT
68
import android.os.Parcelable
79
import androidx.appcompat.content.res.AppCompatResources
810
import androidx.recyclerview.widget.GridLayoutManager
@@ -676,7 +678,10 @@ open class DragDropSwipeRecyclerView @JvmOverloads constructor(
676678
var superState = state
677679

678680
if (isSaveEnabled && state is Bundle) {
679-
superState = state.getParcelable(SUPER_STATE_KEY)
681+
superState = when {
682+
SDK_INT >= Build.VERSION_CODES.TIRAMISU -> state.getParcelable(SUPER_STATE_KEY, Parcelable::class.java)
683+
else -> @Suppress("DEPRECATION") state.getParcelable(SUPER_STATE_KEY)
684+
}
680685
itemLayoutId = state.getInt(ITEM_LAYOUT_ID_KEY, 0)
681686
dividerDrawableId = state.getInt(DIVIDER_DRAWABLE_ID_KEY, 0)
682687
behindSwipedItemIconDrawableId = state.getInt(BEHIND_SWIPED_ITEM_ICON_DRAWABLE_ID_KEY, 0)

drag-drop-swipe-recyclerview/src/main/java/com/ernestoyaquello/dragdropswiperecyclerview/util/DragDropSwipeItemDecoration.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ internal class DragDropSwipeItemDecoration(var divider: Drawable) : RecyclerView
3838
drawHorizontalDividers(child, c, divider)
3939
drawVerticalDividers(child, c, divider)
4040
}
41+
42+
null -> {}
4143
}
4244
}
4345
} else throw TypeCastException("The recycler view must be an extension of DragDropSwipeRecyclerView.")
@@ -67,6 +69,8 @@ internal class DragDropSwipeItemDecoration(var divider: Drawable) : RecyclerView
6769
if (position >= parent.numOfRowsPerColumnInGridList)
6870
outRect.left = divider.intrinsicWidth
6971
}
72+
73+
null -> {}
7074
}
7175
}
7276
} else throw TypeCastException("The recycler view must be an extension of DragDropSwipeRecyclerView.")

gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
android.defaults.buildfeatures.buildconfig=true
12
android.enableJetifier=true
3+
android.nonFinalResIds=false
4+
android.nonTransitiveRClass=false
25
android.useAndroidX=true
36
org.gradle.jvmargs=-Xmx1536m
47
systemProp.org.gradle.internal.publish.checksums.insecure=true

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip

0 commit comments

Comments
 (0)