Skip to content

update deps #134

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
May 5, 2022
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
1 change: 1 addition & 0 deletions .idea/compiler.xml

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

1 change: 1 addition & 0 deletions .idea/gradle.xml

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

2 changes: 1 addition & 1 deletion .idea/misc.xml

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

1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,5 @@ dependencies {
addUnitTest()
testImplementation(testUtils)
testImplementation(deps.koin.testJunit4)
testImplementation(deps.koin.test)
}
3 changes: 1 addition & 2 deletions app/src/main/java/com/hoc/flowmvi/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ class App : Application() {
startKoin {
androidContext(this@App)

// TODO(koin): https://github.com/InsertKoinIO/koin/issues/1188
androidLogger(if (BuildConfig.DEBUG) Level.ERROR else Level.NONE)
androidLogger(if (BuildConfig.DEBUG) Level.DEBUG else Level.NONE)

modules(allModules)
}
Expand Down
3 changes: 1 addition & 2 deletions app/src/test/java/com/hoc/flowmvi/CheckModulesTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ class CheckModulesTest : AutoCloseKoinTest() {
koinApplication {
modules(allModules)

// TODO(koin): https://github.com/InsertKoinIO/koin/issues/1188
printLogger(Level.ERROR)
printLogger(Level.DEBUG)

checkModules {
withInstance<SavedStateHandle>()
Expand Down
33 changes: 16 additions & 17 deletions buildSrc/src/main/kotlin/deps.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,33 @@ import org.gradle.kotlin.dsl.project
import org.gradle.plugin.use.PluginDependenciesSpec
import org.gradle.plugin.use.PluginDependencySpec

const val ktlintVersion = "0.43.2"
const val kotlinVersion = "1.6.10"
const val ktlintVersion = "0.44.0"
const val kotlinVersion = "1.6.21"

object appConfig {
const val applicationId = "com.hoc.flowmvi"

const val compileSdkVersion = 31
const val buildToolsVersion = "31.0.0"
const val compileSdkVersion = 32
const val buildToolsVersion = "32.0.0"

const val minSdkVersion = 21
const val targetSdkVersion = 31
const val targetSdkVersion = 32

private const val MAJOR = 2
private const val MINOR = 1
private const val PATCH = 0
private const val PATCH = 1
const val versionCode = MAJOR * 10000 + MINOR * 100 + PATCH
const val versionName = "$MAJOR.$MINOR.$PATCH"
const val versionName = "$MAJOR.$MINOR.$PATCH-SNAPSHOT"
}

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.1"
const val constraintLayout = "androidx.constraintlayout:constraintlayout:2.1.3"
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-alpha02"
const val material = "com.google.android.material:material:1.6.0"
}

object lifecycle {
Expand All @@ -52,28 +52,29 @@ object deps {
}

object coroutines {
private const val version = "1.6.0"
private const val version = "1.6.1"

const val core = "org.jetbrains.kotlinx:kotlinx-coroutines-core:$version"
const val android = "org.jetbrains.kotlinx:kotlinx-coroutines-android:$version"
const val test = "org.jetbrains.kotlinx:kotlinx-coroutines-test:$version"
}

object koin {
private const val version = "3.1.5"
private const val version = "3.2.0-beta-1"

const val core = "io.insert-koin:koin-core:$version"
const val android = "io.insert-koin:koin-android:$version"
const val testJunit4 = "io.insert-koin:koin-test-junit4:$version"
const val test = "io.insert-koin:koin-test:$version"
}

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

object arrow {
private const val version = "1.0.1"
private const val version = "1.1.2"
const val core = "io.arrow-kt:arrow-core:$version"
}

Expand All @@ -89,7 +90,7 @@ object deps {
}
}

const val mockk = "io.mockk:mockk:1.12.1"
const val mockk = "io.mockk:mockk:1.12.3"
const val kotlinJUnit = "org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersion"
}
}
Expand Down Expand Up @@ -125,6 +126,4 @@ fun DependencyHandler.addUnitTest(testImplementation: Boolean = true) {
}

val Project.isCiBuild: Boolean
get() = providers.environmentVariable("CI")
.forUseAtConfigurationTime()
.orNull == "true"
get() = providers.environmentVariable("CI").orNull == "true"
1 change: 1 addition & 0 deletions data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,5 @@ dependencies {
addUnitTest()
testImplementation(testUtils)
testImplementation(deps.koin.testJunit4)
testImplementation(deps.koin.test)
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.hoc.flowmvi.data

import arrow.core.ValidatedNel
import arrow.core.computations.either
import arrow.core.continuations.either
import arrow.core.left
import arrow.core.leftWiden
import arrow.core.right
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.Dispatchers.IO
import kotlinx.coroutines.Dispatchers.Main
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.FlowPreview
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.runBlocking
import org.junit.Rule
Expand All @@ -25,14 +26,15 @@ import kotlin.test.Test
import kotlin.test.assertTrue
import kotlin.time.ExperimentalTime

@FlowPreview
@ExperimentalCoroutinesApi
@ExperimentalTime
@ExperimentalStdlibApi
class UserRepositoryImplRealAPITest : KoinTest {
@get:Rule
val koinRuleTest = KoinTestRule.create {
// TODO(koin): https://github.com/InsertKoinIO/koin/issues/1188
printLogger(Level.ERROR)
printLogger(Level.DEBUG)

modules(
dataModule,
module {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class MainActivity :
}
}

override fun onCreateOptionsMenu(menu: Menu?) =
override fun onCreateOptionsMenu(menu: Menu) =
menuInflater.inflate(R.menu.menu_main, menu).let { true }

override fun setupViews() {
Expand Down