Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle & libraries upgrade #254

Merged
merged 8 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 4 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ plugins {
alias libs.plugins.spotless
alias libs.plugins.navigation.safeargs
id "org.jetbrains.kotlin.plugin.serialization" version "1.7.0"
id "io.gitlab.arturbosch.detekt" version "1.22.0"
}

android {
Expand All @@ -17,7 +16,7 @@ android {

defaultConfig {
applicationId "com.hieuwu.groceriesstore"
minSdkVersion 22
minSdkVersion 29
targetSdkVersion 33
versionCode 5
versionName "1.0"
Expand Down Expand Up @@ -69,7 +68,7 @@ android {
}

composeOptions {
kotlinCompilerExtensionVersion "1.5.2"
kotlinCompilerExtensionVersion "1.5.14"
}
namespace 'com.hieuwu.groceriesstore'
}
Expand Down Expand Up @@ -117,6 +116,8 @@ dependencies {
implementation("io.github.jan-tennert.supabase:postgrest-kt")
implementation("io.github.jan-tennert.supabase:gotrue-kt")
implementation("io.github.jan-tennert.supabase:storage-kt")
implementation("io.github.jan-tennert.supabase:compose-auth-ui")


def composeBom = platform('androidx.compose:compose-bom:2023.09.02')
implementation(composeBom)
Expand All @@ -140,8 +141,6 @@ dependencies {
def nav_version = "2.5.3"
implementation(libs.androidx.navigation.compose)
implementation libs.androidx.material.icons.extended

implementation libs.caruilib
testImplementation libs.mockito.kotlin

testImplementation libs.junit
Expand All @@ -153,11 +152,6 @@ task wrapper(type: Wrapper) {
gradleVersion = '7.5'
}

detekt {
config = files("${project.rootDir.absolutePath}/config/detekt/detekt.yml")
buildUponDefaultConfig = true
}

ktlint {
// android.set(true)
// reporters {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material.DismissDirection
import androidx.compose.material.DismissState
import androidx.compose.material.DismissValue
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Delete
import androidx.compose.material3.DismissDirection
import androidx.compose.material3.DismissState
import androidx.compose.material3.DismissValue
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material.rememberDismissState
import androidx.compose.material3.Icon
import androidx.compose.material3.SwipeToDismiss
import androidx.compose.material3.rememberDismissState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
Expand All @@ -30,7 +29,7 @@ import androidx.compose.ui.unit.dp
import kotlinx.coroutines.delay


@OptIn(ExperimentalMaterial3Api::class)
@OptIn(ExperimentalMaterialApi::class)
@Composable
fun <T> SwipeToDeleteContainer(
item: T,
Expand All @@ -42,7 +41,7 @@ fun <T> SwipeToDeleteContainer(
mutableStateOf(false)
}
val state = rememberDismissState(
confirmValueChange = { value ->
confirmStateChange = { value ->
if (value == DismissValue.DismissedToStart) {
isRemoved = true
true
Expand All @@ -66,7 +65,7 @@ fun <T> SwipeToDeleteContainer(
shrinkTowards = Alignment.Top
) + fadeOut()
) {
SwipeToDismiss(
androidx.compose.material.SwipeToDismiss(
state = state,
background = {
DeleteBackground(swipeDismissState = state)
Expand All @@ -77,7 +76,7 @@ fun <T> SwipeToDeleteContainer(
}
}

@OptIn(ExperimentalMaterial3Api::class)
@OptIn(ExperimentalMaterialApi::class)
@Composable
fun DeleteBackground(
swipeDismissState: DismissState
Expand Down
Loading
Loading