Skip to content

Commit

Permalink
Update AGP Dependency (#14)
Browse files Browse the repository at this point in the history
Update AGP Dependency and Few Descriptions
  • Loading branch information
cp-megh-l committed May 28, 2024
1 parent b82d05e commit d84dd12
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 12 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "8.1.2" apply false
id("com.android.application") version "8.4.1" apply false
id("org.jetbrains.kotlin.android") version "1.9.10" apply false
id("com.android.library") version "8.1.2" apply false
id("com.android.library") version "8.4.1" apply false
id ("io.github.gradle-nexus.publish-plugin") version "1.1.0"
}

Expand Down
6 changes: 3 additions & 3 deletions compose-recyclerview/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ android {

dependencies {

implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.core:core-ktx:1.13.1")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.activity:activity-compose:1.8.2")
implementation("com.google.android.material:material:1.11.0")
implementation("androidx.activity:activity-compose:1.9.0")
implementation("com.google.android.material:material:1.12.0")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import com.example.compose_recyclerview.utils.ItemTouchHelperConfig
* @param itemTypeBuilder The optional lambda function to determine the type of each item.
* * Required for effective drag and drop. Provide a non-null [ComposeRecyclerViewAdapter.ItemTypeBuilder] when enabling drag and drop functionality.
* * Useful when dealing with multiple item types, ensuring proper handling and layout customization for each type.
* * If not provided, the builder will be considered as null and drag-and-drop functionality will be disabled.
* @param onDragCompleted Callback triggered when an item drag operation is completed.
* @param itemTouchHelperConfig Configuration block for customizing the behavior of ItemTouchHelper.
* * Specify non-draggable item types, handle drag-and-drop and swipe actions, customize the appearance during drag, and more.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import androidx.recyclerview.widget.RecyclerView
* @property getMovementFlags Callback for providing movement flags for drag and swipe behavior.
* @property onSelectedChanged Callback for handling changes in the selection state of an item.
* @property isLongPressDragEnabled Flag to enable or disable long press drag behavior.
* @property swipeDirs Swipe directions for items. If not provided, all directions are enabled by default.
* @property dragDirs Drag directions for items. If not provided, left or right directions are enabled by default.
*/
class ItemTouchHelperConfig {
var nonDraggableItemTypes: Set<Int> = emptySet()
Expand Down Expand Up @@ -62,6 +64,7 @@ class ItemTouchHelperConfig {

/**
* Flag to enable or disable long press drag behavior.
* Default is true.
*/
var isLongPressDragEnabled: Boolean = true

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Dec 18 17:15:12 IST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
10 changes: 5 additions & 5 deletions sample-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,18 @@ android {
dependencies {

implementation(project(path = ":compose-recyclerview"))
implementation("androidx.core:core-ktx:1.9.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
implementation("androidx.activity:activity-compose:1.8.1")
implementation(platform("androidx.compose:compose-bom:2023.03.00"))
implementation("androidx.core:core-ktx:1.13.1")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.0")
implementation("androidx.activity:activity-compose:1.9.0")
implementation(platform("androidx.compose:compose-bom:2024.05.00"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
androidTestImplementation(platform("androidx.compose:compose-bom:2023.03.00"))
androidTestImplementation(platform("androidx.compose:compose-bom:2024.05.00"))
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation("androidx.compose.ui:ui-test-manifest")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class MainActivity : ComponentActivity() {
ComposeRecyclerView(
modifier = Modifier.fillMaxSize(),
items = listOf(1) + userDataList + listOf(1) + otherUsersDataList,
itemBuilder = { item, index ->
itemBuilder = { _, index ->
if (index == 0) {
Box(
modifier = Modifier.fillMaxWidth(),
Expand Down Expand Up @@ -137,6 +137,8 @@ class MainActivity : ComponentActivity() {
override fun getItemType(position: Int): Int {
// Determine the item type based on the position
// You can customize this logic based on your requirements
// Required for effective drag and drop. Provide a non-null [ComposeRecyclerViewAdapter.ItemTypeBuilder]
// when enabling drag and drop functionality.
return when {
position == 0 -> ITEM_TYPE_FIRST_HEADER // Header type
position <= userDataList.size -> ITEM_TYPE_FIRST_LIST_ITEM // First list item type
Expand Down

0 comments on commit d84dd12

Please sign in to comment.