diff --git a/.fleet/run.json b/.fleet/run.json index 4b7c3fea..3d0e8ab9 100644 --- a/.fleet/run.json +++ b/.fleet/run.json @@ -1,9 +1,11 @@ { - "configurations": [ - { - "type": "gradle", - "name": "Run App", - "tasks": ["run"] - } - ] + "configurations": [ + { + "type": "gradle", + "name": "Run App", + "tasks": [ + "run" + ] + } + ] } \ No newline at end of file diff --git a/README.md b/README.md index fec4b4a0..e748017e 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,8 @@ | Windows |[![Download Button](https://img.shields.io/static/v1?label=Windows&message=Stackzy.msi&color=30A3E6)](https://github.com/theapache64/stackzy/releases/latest)| Experimental | | MacOS |[![Download Button](https://img.shields.io/static/v1?label=MacOS&message=Stackzy.jar&color=30A3E6)](https://github.com/theapache64/stackzy/releases/latest) | Experimental | -> ℹ️ To run the `jar`, you need Java 15 or above. If you hate running jar, you can clone the repo and execute `./gradlew createDistributable` to +> ℹ️ To run the `jar`, you need Java 15 or above. If you hate running jar, you can clone the repo and +> execute `./gradlew createDistributable` to > build executable for your system. ## 🏋 Dependency diff --git a/build.gradle.kts b/build.gradle.kts index f47b243a..a7290134 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -83,10 +83,10 @@ tasks.test { } tasks.withType { - kotlinOptions.jvmTarget = "11" - kotlinOptions.freeCompilerArgs += "-Xuse-experimental=androidx.compose.foundation.ExperimentalFoundationApi" - kotlinOptions.freeCompilerArgs += "-Xuse-experimental=androidx.compose.ui.ExperimentalComposeUiApi" - kotlinOptions.freeCompilerArgs += "-Xuse-experimental=kotlin.io.path.ExperimentalPathApi" + kotlinOptions.jvmTarget = "15" + // kotlinOptions.freeCompilerArgs += "-Xuse-experimental=androidx.compose.foundation.ExperimentalFoundationApi" + // kotlinOptions.freeCompilerArgs += "-Xuse-experimental=androidx.compose.ui.ExperimentalComposeUiApi" + // kotlinOptions.freeCompilerArgs += "-Xuse-experimental=kotlin.io.path.ExperimentalPathApi" } tasks.withType { diff --git a/data/build.gradle.kts b/data/build.gradle.kts index 8cf954f6..2dda30be 100644 --- a/data/build.gradle.kts +++ b/data/build.gradle.kts @@ -53,8 +53,8 @@ dependencies { } tasks.withType { - kotlinOptions.jvmTarget = "11" - kotlinOptions.freeCompilerArgs += "-Xuse-experimental=androidx.compose.foundation.ExperimentalFoundationApi" - kotlinOptions.freeCompilerArgs += "-Xuse-experimental=androidx.compose.ui.ExperimentalComposeUiApi" - kotlinOptions.freeCompilerArgs += "-Xuse-experimental=kotlin.io.path.ExperimentalPathApi" + kotlinOptions.jvmTarget = "15" + // kotlinOptions.freeCompilerArgs += "-Xuse-experimental=androidx.compose.foundation.ExperimentalFoundationApi" + // kotlinOptions.freeCompilerArgs += "-Xuse-experimental=androidx.compose.ui.ExperimentalComposeUiApi" + // kotlinOptions.freeCompilerArgs += "-Xuse-experimental=kotlin.io.path.ExperimentalPathApi" } \ No newline at end of file diff --git a/src/main/kotlin/com/theapache64/stackzy/ui/common/Selectable.kt b/src/main/kotlin/com/theapache64/stackzy/ui/common/Selectable.kt index 2b929981..bff85b00 100644 --- a/src/main/kotlin/com/theapache64/stackzy/ui/common/Selectable.kt +++ b/src/main/kotlin/com/theapache64/stackzy/ui/common/Selectable.kt @@ -51,12 +51,12 @@ fun Modifier.addHoverEffect( } return this.background(normalColor.copy(alpha = backgroundAlpha), RoundedCornerShape(cornerRadius)).clickable { - onClicked() - }.onPointerEvent(eventType = PointerEventType.Enter, onEvent = { - isHovered = true - }).onPointerEvent(eventType = PointerEventType.Exit, onEvent = { - isHovered = false - }) + onClicked() + }.onPointerEvent(eventType = PointerEventType.Enter, onEvent = { + isHovered = true + }).onPointerEvent(eventType = PointerEventType.Exit, onEvent = { + isHovered = false + }) } // Preview @@ -102,8 +102,8 @@ fun Selectable( ) { Row(modifier = modifier.fillMaxWidth().addHoverEffect(onClicked = { - onSelected(data) - }).padding(padding), verticalAlignment = Alignment.CenterVertically) { + onSelected(data) + }).padding(padding), verticalAlignment = Alignment.CenterVertically) { if (data.imageUrl() == null) { // Show only alphabet diff --git a/src/main/kotlin/com/theapache64/stackzy/ui/feature/applist/AppListScreen.kt b/src/main/kotlin/com/theapache64/stackzy/ui/feature/applist/AppListScreen.kt index 760159cc..9d6cf074 100644 --- a/src/main/kotlin/com/theapache64/stackzy/ui/feature/applist/AppListScreen.kt +++ b/src/main/kotlin/com/theapache64/stackzy/ui/feature/applist/AppListScreen.kt @@ -4,7 +4,6 @@ import androidx.compose.foundation.layout.* import androidx.compose.foundation.lazy.grid.GridCells import androidx.compose.foundation.lazy.grid.LazyVerticalGrid import androidx.compose.foundation.lazy.grid.items -import androidx.compose.foundation.lazy.items import androidx.compose.material.* import androidx.compose.material.icons.Icons import androidx.compose.material.icons.outlined.Search diff --git a/src/main/kotlin/com/theapache64/stackzy/ui/feature/devicelist/DeviceListViewModel.kt b/src/main/kotlin/com/theapache64/stackzy/ui/feature/devicelist/DeviceListViewModel.kt index cc6891e5..8e15ed89 100644 --- a/src/main/kotlin/com/theapache64/stackzy/ui/feature/devicelist/DeviceListViewModel.kt +++ b/src/main/kotlin/com/theapache64/stackzy/ui/feature/devicelist/DeviceListViewModel.kt @@ -8,7 +8,6 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.catch -import kotlinx.coroutines.flow.collect import kotlinx.coroutines.launch import javax.inject.Inject diff --git a/src/main/kotlin/com/theapache64/stackzy/ui/feature/libdetail/LibraryDetailViewModel.kt b/src/main/kotlin/com/theapache64/stackzy/ui/feature/libdetail/LibraryDetailViewModel.kt index fd2dc13b..51b84357 100644 --- a/src/main/kotlin/com/theapache64/stackzy/ui/feature/libdetail/LibraryDetailViewModel.kt +++ b/src/main/kotlin/com/theapache64/stackzy/ui/feature/libdetail/LibraryDetailViewModel.kt @@ -14,7 +14,6 @@ import com.theapache64.stackzy.util.R import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.asStateFlow -import kotlinx.coroutines.flow.collect import kotlinx.coroutines.launch import javax.inject.Inject diff --git a/src/main/kotlin/com/theapache64/stackzy/ui/feature/liblist/LibraryListScreen.kt b/src/main/kotlin/com/theapache64/stackzy/ui/feature/liblist/LibraryListScreen.kt index d8c14334..46d6c7e9 100644 --- a/src/main/kotlin/com/theapache64/stackzy/ui/feature/liblist/LibraryListScreen.kt +++ b/src/main/kotlin/com/theapache64/stackzy/ui/feature/liblist/LibraryListScreen.kt @@ -4,7 +4,6 @@ import androidx.compose.foundation.layout.* import androidx.compose.foundation.lazy.grid.GridCells import androidx.compose.foundation.lazy.grid.LazyVerticalGrid import androidx.compose.foundation.lazy.grid.items -import androidx.compose.foundation.lazy.items import androidx.compose.material.Icon import androidx.compose.material.OutlinedTextField import androidx.compose.material.Text diff --git a/src/main/kotlin/com/theapache64/stackzy/ui/feature/liblist/LibraryListViewModel.kt b/src/main/kotlin/com/theapache64/stackzy/ui/feature/liblist/LibraryListViewModel.kt index 4cd14e4b..e985b80b 100644 --- a/src/main/kotlin/com/theapache64/stackzy/ui/feature/liblist/LibraryListViewModel.kt +++ b/src/main/kotlin/com/theapache64/stackzy/ui/feature/liblist/LibraryListViewModel.kt @@ -10,7 +10,6 @@ import com.theapache64.stackzy.ui.util.getSingularOrPlural import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow -import kotlinx.coroutines.flow.collect import kotlinx.coroutines.launch import java.util.* import javax.inject.Inject diff --git a/src/main/kotlin/com/theapache64/stackzy/ui/feature/login/LogInScreenViewModel.kt b/src/main/kotlin/com/theapache64/stackzy/ui/feature/login/LogInScreenViewModel.kt index 07eb9e87..5f3a05c7 100644 --- a/src/main/kotlin/com/theapache64/stackzy/ui/feature/login/LogInScreenViewModel.kt +++ b/src/main/kotlin/com/theapache64/stackzy/ui/feature/login/LogInScreenViewModel.kt @@ -6,7 +6,6 @@ import com.theapache64.stackzy.data.util.calladapter.flow.Resource import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow -import kotlinx.coroutines.flow.collect import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.launch import java.awt.Desktop diff --git a/src/main/kotlin/com/theapache64/stackzy/ui/feature/splash/SplashViewModel.kt b/src/main/kotlin/com/theapache64/stackzy/ui/feature/splash/SplashViewModel.kt index 9564cb4e..c2ed77dd 100644 --- a/src/main/kotlin/com/theapache64/stackzy/ui/feature/splash/SplashViewModel.kt +++ b/src/main/kotlin/com/theapache64/stackzy/ui/feature/splash/SplashViewModel.kt @@ -13,7 +13,6 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.SharedFlow import kotlinx.coroutines.flow.StateFlow -import kotlinx.coroutines.flow.collect import kotlinx.coroutines.launch import java.io.IOException import javax.inject.Inject diff --git a/src/main/kotlin/com/theapache64/stackzy/util/flow/EventFlow.kt b/src/main/kotlin/com/theapache64/stackzy/util/flow/EventFlow.kt index a57e0b75..b862819a 100644 --- a/src/main/kotlin/com/theapache64/stackzy/util/flow/EventFlow.kt +++ b/src/main/kotlin/com/theapache64/stackzy/util/flow/EventFlow.kt @@ -19,7 +19,7 @@ import kotlinx.coroutines.flow.MutableSharedFlow /** * To fire events. - * This flow won't fire the last value for each collect call. + * This flow won't fire the last value for each collect call. * This observer will only be invoked on `tryEmit` calls. * (replacement for SingleLiveEvent :D) * Created by theapache64 : Jan 08 Fri,2021 @ 01:40 diff --git a/src/test/kotlin/com/theapache64/stackzy/data/repo/AdbRepoTest.kt b/src/test/kotlin/com/theapache64/stackzy/data/repo/AdbRepoTest.kt index 1e367553..3cf67858 100644 --- a/src/test/kotlin/com/theapache64/stackzy/data/repo/AdbRepoTest.kt +++ b/src/test/kotlin/com/theapache64/stackzy/data/repo/AdbRepoTest.kt @@ -8,7 +8,6 @@ import com.theapache64.stackzy.test.MyDaggerMockRule import com.theapache64.stackzy.test.NATIVE_KOTLIN_PACKAGE_NAME import com.theapache64.stackzy.test.runBlockingUnitTest import it.cosenonjaviste.daggermock.InjectFromComponent -import kotlinx.coroutines.flow.collect import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.first import org.junit.Rule diff --git a/src/test/kotlin/com/theapache64/stackzy/data/repo/AuthRepoTest.kt b/src/test/kotlin/com/theapache64/stackzy/data/repo/AuthRepoTest.kt index 752c5e37..33c47e1b 100644 --- a/src/test/kotlin/com/theapache64/stackzy/data/repo/AuthRepoTest.kt +++ b/src/test/kotlin/com/theapache64/stackzy/data/repo/AuthRepoTest.kt @@ -9,7 +9,6 @@ import com.toxicbakery.logging.Arbor import it.cosenonjaviste.daggermock.InjectFromComponent import org.junit.Rule import org.junit.Test -import kotlinx.coroutines.flow.collect class AuthRepoTest { diff --git a/src/test/kotlin/com/theapache64/stackzy/data/repo/ConfigRepoTest.kt b/src/test/kotlin/com/theapache64/stackzy/data/repo/ConfigRepoTest.kt index 5ef4a770..91207602 100644 --- a/src/test/kotlin/com/theapache64/stackzy/data/repo/ConfigRepoTest.kt +++ b/src/test/kotlin/com/theapache64/stackzy/data/repo/ConfigRepoTest.kt @@ -8,7 +8,6 @@ import com.toxicbakery.logging.Arbor import it.cosenonjaviste.daggermock.InjectFromComponent import org.junit.Rule import org.junit.Test -import kotlinx.coroutines.flow.collect class ConfigRepoTest { diff --git a/src/test/kotlin/com/theapache64/stackzy/data/repo/LibrariesRepoTest.kt b/src/test/kotlin/com/theapache64/stackzy/data/repo/LibrariesRepoTest.kt index 5c20ec9b..88e02200 100644 --- a/src/test/kotlin/com/theapache64/stackzy/data/repo/LibrariesRepoTest.kt +++ b/src/test/kotlin/com/theapache64/stackzy/data/repo/LibrariesRepoTest.kt @@ -7,7 +7,6 @@ import com.theapache64.stackzy.test.runBlockingUnitTest import it.cosenonjaviste.daggermock.InjectFromComponent import org.junit.Rule import org.junit.Test -import kotlinx.coroutines.flow.collect internal class LibrariesRepoTest { diff --git a/src/test/kotlin/com/theapache64/stackzy/data/repo/PlayStoreRepoTest.kt b/src/test/kotlin/com/theapache64/stackzy/data/repo/PlayStoreRepoTest.kt index 39930479..7c2c68b1 100644 --- a/src/test/kotlin/com/theapache64/stackzy/data/repo/PlayStoreRepoTest.kt +++ b/src/test/kotlin/com/theapache64/stackzy/data/repo/PlayStoreRepoTest.kt @@ -12,7 +12,6 @@ import org.junit.Rule import org.junit.Test import org.junit.jupiter.api.BeforeAll import org.junit.jupiter.api.TestInstance -import kotlinx.coroutines.flow.collect @TestInstance(TestInstance.Lifecycle.PER_CLASS) class PlayStoreRepoTest { diff --git a/src/test/kotlin/com/theapache64/stackzy/data/repo/ResultsRepoTest.kt b/src/test/kotlin/com/theapache64/stackzy/data/repo/ResultsRepoTest.kt index 907354ad..3979bd76 100644 --- a/src/test/kotlin/com/theapache64/stackzy/data/repo/ResultsRepoTest.kt +++ b/src/test/kotlin/com/theapache64/stackzy/data/repo/ResultsRepoTest.kt @@ -17,7 +17,6 @@ import org.junit.Rule import org.junit.Test import org.junit.jupiter.api.BeforeAll import kotlin.io.path.createTempDirectory -import kotlinx.coroutines.flow.collect class ResultsRepoTest { diff --git a/src/test/kotlin/com/theapache64/stackzy/data/repo/UntrackedLibsRepoTest.kt b/src/test/kotlin/com/theapache64/stackzy/data/repo/UntrackedLibsRepoTest.kt index 264751f1..7f1090d7 100644 --- a/src/test/kotlin/com/theapache64/stackzy/data/repo/UntrackedLibsRepoTest.kt +++ b/src/test/kotlin/com/theapache64/stackzy/data/repo/UntrackedLibsRepoTest.kt @@ -8,7 +8,6 @@ import com.theapache64.stackzy.test.runBlockingUnitTest import it.cosenonjaviste.daggermock.InjectFromComponent import org.junit.Rule import org.junit.Test -import kotlinx.coroutines.flow.collect internal class UntrackedLibsRepoTest { diff --git a/src/test/kotlin/com/theapache64/stackzy/util/LibrariesRepoExt.kt b/src/test/kotlin/com/theapache64/stackzy/util/LibrariesRepoExt.kt index 53d632fa..af0b61cd 100644 --- a/src/test/kotlin/com/theapache64/stackzy/util/LibrariesRepoExt.kt +++ b/src/test/kotlin/com/theapache64/stackzy/util/LibrariesRepoExt.kt @@ -4,7 +4,6 @@ import com.theapache64.stackzy.data.remote.Library import com.theapache64.stackzy.data.repo.LibrariesRepo import com.theapache64.stackzy.data.util.calladapter.flow.Resource import com.toxicbakery.logging.Arbor -import kotlinx.coroutines.flow.collect suspend fun LibrariesRepo.loadLibs(onLibsLoaded: suspend (List) -> Unit) { getRemoteLibraries().collect {