Skip to content

deps #153

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

Merged
merged 1 commit into from
Jul 22, 2022
Merged

deps #153

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
23 changes: 22 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
import java.util.EnumSet
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
Expand Down Expand Up @@ -26,8 +27,28 @@ buildscript {
subprojects {
apply(plugin = "com.diffplug.spotless")
apply(plugin = "com.vanniktech.android.junit.jacoco")

apply(plugin = "com.github.ben-manes.versions")

fun isNonStable(version: String): Boolean {
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.toUpperCase().contains(it) }
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
val isStable = stableKeyword || regex.matches(version)
return !isStable
}

fun isStable(version: String) = !isNonStable(version)

tasks.withType<DependencyUpdatesTask> {
rejectVersionIf {
if (isStable(currentVersion)) {
isNonStable(candidate.version)
} else {
false
}
}
}

configure<com.diffplug.gradle.spotless.SpotlessExtension> {
val EDITOR_CONFIG_KEYS: Set<String> = hashSetOf(
"ij_kotlin_imports_layout",
Expand Down Expand Up @@ -91,7 +112,7 @@ subprojects {
}

configure<com.vanniktech.android.junit.jacoco.JunitJacocoExtension> {
jacocoVersion = "0.8.7"
jacocoVersion = "0.8.8"
includeNoLocationClasses = true
includeInstrumentationCoverageInMergedReport = true
csv.isEnabled = false
Expand Down
24 changes: 12 additions & 12 deletions buildSrc/src/main/kotlin/deps.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.gradle.plugin.use.PluginDependenciesSpec
import org.gradle.plugin.use.PluginDependencySpec

const val ktlintVersion = "0.45.2"
const val kotlinVersion = "1.7.0"
const val kotlinVersion = "1.7.10"

object appConfig {
const val applicationId = "com.hoc.flowmvi"
Expand All @@ -27,16 +27,16 @@ object appConfig {

object deps {
object androidx {
const val appCompat = "androidx.appcompat:appcompat:1.4.1"
const val coreKtx = "androidx.core:core-ktx:1.7.0"
const val constraintLayout = "androidx.constraintlayout:constraintlayout:2.1.3"
const val appCompat = "androidx.appcompat:appcompat:1.4.2"
const val coreKtx = "androidx.core:core-ktx:1.8.0"
const val constraintLayout = "androidx.constraintlayout:constraintlayout:2.1.4"
const val recyclerView = "androidx.recyclerview:recyclerview:1.2.1"
const val swipeRefreshLayout = "androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01"
const val material = "com.google.android.material:material:1.6.0"
const val material = "com.google.android.material:material:1.6.1"
}

object lifecycle {
private const val version = "2.4.0"
private const val version = "2.5.0"

const val viewModelKtx = "androidx.lifecycle:lifecycle-viewmodel-ktx:$version" // viewModelScope
const val runtimeKtx = "androidx.lifecycle:lifecycle-runtime-ktx:$version" // lifecycleScope
Expand All @@ -46,13 +46,13 @@ object deps {
object squareup {
const val retrofit = "com.squareup.retrofit2:retrofit:2.9.0"
const val converterMoshi = "com.squareup.retrofit2:converter-moshi:2.9.0"
const val loggingInterceptor = "com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.2"
const val moshiKotlin = "com.squareup.moshi:moshi-kotlin:1.12.0"
const val leakCanary = "com.squareup.leakcanary:leakcanary-android:2.7"
const val loggingInterceptor = "com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.10"
const val moshiKotlin = "com.squareup.moshi:moshi-kotlin:1.13.0"
const val leakCanary = "com.squareup.leakcanary:leakcanary-android:2.9.1"
}

object coroutines {
private const val version = "1.6.2"
private const val version = "1.6.4"

const val core = "org.jetbrains.kotlinx:kotlinx-coroutines-core:$version"
const val android = "org.jetbrains.kotlinx:kotlinx-coroutines-android:$version"
Expand All @@ -68,9 +68,9 @@ object deps {
const val test = "io.insert-koin:koin-test:$version"
}

const val coil = "io.coil-kt:coil:2.0.0-rc03"
const val coil = "io.coil-kt:coil:2.1.0"
const val viewBindingDelegate = "com.github.hoc081098:ViewBindingDelegate:1.3.1"
const val flowExt = "io.github.hoc081098:FlowExt:0.4.0-SNAPSHOT"
const val flowExt = "io.github.hoc081098:FlowExt:0.4.0"
const val timber = "com.jakewharton.timber:timber:5.0.1"

object arrow {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists