Skip to content

Instantly share code, notes, and snippets.

View VahidGarousi's full-sized avatar

Vahid Garousi VahidGarousi

View GitHub Profile
package ir.modjame.core.ui.paginator.manager
import ir.modjame.core.common.util.DataError
import ir.modjame.core.common.util.Result
import ir.modjame.core.common.util.map
import ir.modjame.core.domain.model.CursorPaginatedResult
import ir.modjame.core.domain.model.PaginatedResult
class CursorBasedPaginationManager<T>(
private var initialCursor: String?,
@VahidGarousi
VahidGarousi / detekt.yaml
Last active December 16, 2024 12:47
detekt.yaml
# Note that this is a slimmed version of a detekt config file that only includes behavior we
# want to override for our application. This is done by using `buildUponDefaultConfig` in the gradle
# configuration.
naming:
active: true
BooleanPropertyNaming:
active: true
allowedPattern: '^(is|has|are|can|was|should)'
@VahidGarousi
VahidGarousi / AndroidLibraryConventionPlugin.kt
Created September 27, 2023 04:25
Detekt in Gradle Convention for Android
class AndroidLibraryConventionPlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
with(pluginManager) {
apply("com.android.library")
apply("org.jetbrains.kotlin.android")
apply("composenews.android.detekt") // here
apply("composenews.android.ktlint")
}