diff --git a/projects/android/koin-android/src/main/java/org/koin/androidx/viewmodel/ext/android/ViewModelLazy.kt b/projects/android/koin-android/src/main/java/org/koin/androidx/viewmodel/ext/android/ViewModelLazy.kt index ae3b3202c..8fa526372 100644 --- a/projects/android/koin-android/src/main/java/org/koin/androidx/viewmodel/ext/android/ViewModelLazy.kt +++ b/projects/android/koin-android/src/main/java/org/koin/androidx/viewmodel/ext/android/ViewModelLazy.kt @@ -1,5 +1,3 @@ -@file:Suppress("DEPRECATION") - package org.koin.androidx.viewmodel.ext.android import androidx.activity.ComponentActivity @@ -64,4 +62,4 @@ fun Fragment.viewModelForClass( scope = getKoinScope() ) } -} \ No newline at end of file +} diff --git a/projects/android/koin-android/src/test/java/org/koin/test/android/ext/android/AndroidKoinScopeExtTest.kt b/projects/android/koin-android/src/test/java/org/koin/test/android/ext/android/AndroidKoinScopeExtTest.kt index fcb11e0a8..6496f22e4 100644 --- a/projects/android/koin-android/src/test/java/org/koin/test/android/ext/android/AndroidKoinScopeExtTest.kt +++ b/projects/android/koin-android/src/test/java/org/koin/test/android/ext/android/AndroidKoinScopeExtTest.kt @@ -16,7 +16,6 @@ import org.koin.test.android.helper.Helper.componentCallbacks import org.koin.test.android.helper.Helper.koinComponent import org.koin.test.android.helper.Helper.koinScopeComponent -@Suppress("OPT_IN_IS_NOT_ENABLED") @OptIn(KoinInternalApi::class) class AndroidKoinScopeExtTest : KoinTest { diff --git a/projects/compose/koin-androidx-compose-navigation/src/main/java/org/koin/androidx/compose/navigation/NavViewModel.kt b/projects/compose/koin-androidx-compose-navigation/src/main/java/org/koin/androidx/compose/navigation/NavViewModel.kt index 687ce5000..5709058e4 100644 --- a/projects/compose/koin-androidx-compose-navigation/src/main/java/org/koin/androidx/compose/navigation/NavViewModel.kt +++ b/projects/compose/koin-androidx-compose-navigation/src/main/java/org/koin/androidx/compose/navigation/NavViewModel.kt @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@file:Suppress("DeprecatedCallableAddReplaceWith") package org.koin.androidx.compose.navigation import androidx.compose.runtime.Composable -import androidx.lifecycle.* +import androidx.lifecycle.ViewModel +import androidx.lifecycle.ViewModelStoreOwner import androidx.lifecycle.viewmodel.CreationExtras import androidx.lifecycle.viewmodel.compose.LocalViewModelStoreOwner import org.koin.compose.currentKoinScope @@ -52,4 +52,4 @@ inline fun koinNavViewModel( return resolveViewModel( T::class, viewModelStoreOwner.viewModelStore, key, extras, qualifier, scope, parameters ) -} \ No newline at end of file +} diff --git a/projects/compose/koin-androidx-compose/src/main/java/org/koin/androidx/compose/KoinAndroidContext.kt b/projects/compose/koin-androidx-compose/src/main/java/org/koin/androidx/compose/KoinAndroidContext.kt index edccb9ee1..331b2fac8 100644 --- a/projects/compose/koin-androidx-compose/src/main/java/org/koin/androidx/compose/KoinAndroidContext.kt +++ b/projects/compose/koin-androidx-compose/src/main/java/org/koin/androidx/compose/KoinAndroidContext.kt @@ -25,8 +25,6 @@ import androidx.compose.runtime.remember import androidx.compose.ui.platform.LocalContext import org.koin.android.ext.android.getKoin import org.koin.compose.KoinContext -import org.koin.core.annotation.KoinExperimentalAPI -import org.koin.core.annotation.KoinInternalApi import org.koin.core.component.KoinComponent import org.koin.mp.KoinPlatformTools @@ -49,7 +47,7 @@ import org.koin.mp.KoinPlatformTools */ @Composable fun KoinAndroidContext( - content: @Composable () -> Unit + content: @Composable () -> Unit, ) { val context = LocalContext.current val koinApplication = remember(context) { @@ -68,4 +66,4 @@ private fun Context.findContextForKoin(): ComponentCallbacks { context = context.baseContext } return applicationContext as Application -} \ No newline at end of file +} diff --git a/projects/compose/koin-androidx-compose/src/main/java/org/koin/androidx/compose/ViewModel.kt b/projects/compose/koin-androidx-compose/src/main/java/org/koin/androidx/compose/ViewModel.kt index 5eed9a712..faf2db22a 100644 --- a/projects/compose/koin-androidx-compose/src/main/java/org/koin/androidx/compose/ViewModel.kt +++ b/projects/compose/koin-androidx-compose/src/main/java/org/koin/androidx/compose/ViewModel.kt @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@file:Suppress("DeprecatedCallableAddReplaceWith") package org.koin.androidx.compose import androidx.compose.runtime.Composable -import androidx.lifecycle.* +import androidx.lifecycle.ViewModel +import androidx.lifecycle.ViewModelStoreOwner import androidx.lifecycle.viewmodel.CreationExtras import androidx.lifecycle.viewmodel.compose.LocalViewModelStoreOwner import org.koin.compose.currentKoinScope @@ -52,4 +52,4 @@ inline fun koinViewModel( return resolveViewModel( T::class, viewModelStoreOwner.viewModelStore, key, extras, qualifier, scope, parameters ) -} \ No newline at end of file +} diff --git a/projects/compose/koin-compose-viewmodel-navigation/src/commonMain/kotlin/org/koin/compose/viewmodel/NavViewModel.kt b/projects/compose/koin-compose-viewmodel-navigation/src/commonMain/kotlin/org/koin/compose/viewmodel/NavViewModel.kt index 5d6f064aa..77cbf276d 100644 --- a/projects/compose/koin-compose-viewmodel-navigation/src/commonMain/kotlin/org/koin/compose/viewmodel/NavViewModel.kt +++ b/projects/compose/koin-compose-viewmodel-navigation/src/commonMain/kotlin/org/koin/compose/viewmodel/NavViewModel.kt @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@file:Suppress("DeprecatedCallableAddReplaceWith") package org.koin.compose.viewmodel import androidx.compose.runtime.Composable -import androidx.lifecycle.* +import androidx.lifecycle.ViewModel +import androidx.lifecycle.ViewModelStoreOwner import androidx.lifecycle.viewmodel.CreationExtras import androidx.lifecycle.viewmodel.compose.LocalViewModelStoreOwner import org.koin.compose.currentKoinScope @@ -58,4 +58,4 @@ inline fun koinNavViewModel( return resolveViewModel( T::class, viewModelStoreOwner.viewModelStore, key, extras, qualifier, scope, parameters ) -} \ No newline at end of file +} diff --git a/projects/compose/koin-compose-viewmodel/src/commonMain/kotlin/org/koin/compose/viewmodel/ViewModel.kt b/projects/compose/koin-compose-viewmodel/src/commonMain/kotlin/org/koin/compose/viewmodel/ViewModel.kt index c57b05295..df1c4eb03 100644 --- a/projects/compose/koin-compose-viewmodel/src/commonMain/kotlin/org/koin/compose/viewmodel/ViewModel.kt +++ b/projects/compose/koin-compose-viewmodel/src/commonMain/kotlin/org/koin/compose/viewmodel/ViewModel.kt @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@file:Suppress("DeprecatedCallableAddReplaceWith") package org.koin.compose.viewmodel import androidx.compose.runtime.Composable -import androidx.lifecycle.* +import androidx.lifecycle.ViewModel +import androidx.lifecycle.ViewModelStoreOwner import androidx.lifecycle.viewmodel.CreationExtras import androidx.lifecycle.viewmodel.compose.LocalViewModelStoreOwner import org.koin.compose.currentKoinScope @@ -57,4 +57,4 @@ inline fun koinViewModel( return resolveViewModel( T::class, viewModelStoreOwner.viewModelStore, key, extras, qualifier, scope, parameters ) -} \ No newline at end of file +} diff --git a/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceFactory.kt b/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceFactory.kt index be5f423e1..4b1d5fcd4 100644 --- a/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceFactory.kt +++ b/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceFactory.kt @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@file:Suppress("UNCHECKED_CAST") package org.koin.core.instance @@ -24,7 +23,6 @@ import org.koin.core.parameter.emptyParametersHolder import org.koin.core.scope.Scope import org.koin.mp.KoinPlatformTools import org.koin.mp.Lockable -import org.koin.mp.generateId /** * Koin Instance Holder diff --git a/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/FactoryOf.kt b/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/FactoryOf.kt index 20abc8833..9ad687f35 100644 --- a/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/FactoryOf.kt +++ b/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/FactoryOf.kt @@ -13,11 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@file:OptIn(KoinInternalApi::class) package org.koin.core.module.dsl -import org.koin.core.annotation.KoinInternalApi import org.koin.core.definition.KoinDefinition import org.koin.core.module.Module diff --git a/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedFactoryOf.kt b/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedFactoryOf.kt index 56027200a..94c55d96c 100644 --- a/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedFactoryOf.kt +++ b/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedFactoryOf.kt @@ -13,11 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@file:OptIn(KoinInternalApi::class) package org.koin.core.module.dsl -import org.koin.core.annotation.KoinInternalApi import org.koin.core.definition.KoinDefinition import org.koin.dsl.ScopeDSL diff --git a/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedOf.kt b/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedOf.kt index a957cb28b..5a652c547 100644 --- a/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedOf.kt +++ b/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedOf.kt @@ -13,13 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@file:OptIn(KoinInternalApi::class) package org.koin.core.module.dsl -import org.koin.core.annotation.KoinInternalApi import org.koin.core.definition.KoinDefinition -import org.koin.core.module.* import org.koin.dsl.ScopeDSL /** diff --git a/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/SingleOf.kt b/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/SingleOf.kt index 4d7393f99..cd1ffa81b 100644 --- a/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/SingleOf.kt +++ b/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/SingleOf.kt @@ -13,11 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@file:OptIn(KoinInternalApi::class) package org.koin.core.module.dsl -import org.koin.core.annotation.KoinInternalApi import org.koin.core.definition.KoinDefinition import org.koin.core.module.Module diff --git a/projects/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ScopeDSL.kt b/projects/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ScopeDSL.kt index 9c62643a4..e783517a4 100644 --- a/projects/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ScopeDSL.kt +++ b/projects/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ScopeDSL.kt @@ -18,14 +18,15 @@ package org.koin.dsl import org.koin.core.annotation.KoinInternalApi import org.koin.core.definition.Definition import org.koin.core.definition.KoinDefinition -import org.koin.core.module.* +import org.koin.core.module.KoinDslMarker +import org.koin.core.module.Module +import org.koin.core.module._scopedInstanceFactory import org.koin.core.qualifier.Qualifier /** * DSL Scope Definition */ @OptIn(KoinInternalApi::class) -@Suppress("UNUSED_PARAMETER") @KoinDslMarker class ScopeDSL(val scopeQualifier: Qualifier, val module: Module) { diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/Components.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/Components.kt index 2764884e6..4e5e506cf 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/Components.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/Components.kt @@ -22,7 +22,6 @@ class Simple { class AllFactory2(val strings: MyStringFactory, val ints: MyIntFactory) } -@Suppress("unused") class Errors { class Boom { init { diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/core/ParameterStackTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/core/ParameterStackTest.kt index fcede0946..9d03f624b 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/core/ParameterStackTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/core/ParameterStackTest.kt @@ -1,7 +1,6 @@ package org.koin.core import org.koin.Simple -import org.koin.core.annotation.KoinInternalApi import org.koin.core.logger.Level import org.koin.core.parameter.parametersOf import org.koin.dsl.koinApplication @@ -9,9 +8,7 @@ import org.koin.dsl.module import org.koin.mp.KoinPlatformTools import org.koin.mp.generateId import kotlin.test.Test -import kotlin.test.assertTrue -@OptIn(KoinInternalApi::class) class ParameterStackTest { @Test diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/core/ParametersInjectionTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/core/ParametersInjectionTest.kt index d96ef5431..772ce9ec4 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/core/ParametersInjectionTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/core/ParametersInjectionTest.kt @@ -1,13 +1,11 @@ package org.koin.core import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.async import kotlinx.coroutines.awaitAll import kotlinx.coroutines.test.TestResult import kotlinx.coroutines.test.runTest import org.koin.Simple -import org.koin.core.annotation.KoinInternalApi import org.koin.core.logger.Level import org.koin.core.module.Module import org.koin.core.module.dsl.singleOf @@ -18,7 +16,6 @@ import org.koin.dsl.module import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertNull -import kotlin.test.assertTrue class ParametersInjectionTest { @@ -38,7 +35,6 @@ class ParametersInjectionTest { assertEquals(42, a.id) } - @OptIn(KoinInternalApi::class) @Test fun inject_param_get_or_null() { ensureCanInjectParam( @@ -63,7 +59,6 @@ class ParametersInjectionTest { ) } - @OptIn(KoinInternalApi::class) private fun ensureCanInjectParam(module1: Module) { val app = koinApplication { printLogger(Level.DEBUG) @@ -355,10 +350,9 @@ class ParametersInjectionTest { } @Test - @OptIn(ExperimentalCoroutinesApi::class) fun `inject across multiple threads`(): TestResult { val times = 100 - + return runTest { val app = koinApplication { modules( diff --git a/projects/core/koin-test-junit4/src/test/kotlin/org/koin/test/DeclareMockTests.kt b/projects/core/koin-test-junit4/src/test/kotlin/org/koin/test/DeclareMockTests.kt index f0e1a8745..d23ccdf2b 100644 --- a/projects/core/koin-test-junit4/src/test/kotlin/org/koin/test/DeclareMockTests.kt +++ b/projects/core/koin-test-junit4/src/test/kotlin/org/koin/test/DeclareMockTests.kt @@ -13,7 +13,6 @@ import org.koin.test.mock.declareMock import org.mockito.BDDMockito.given import org.mockito.Mockito -@Suppress("UNCHECKED_CAST") class DeclareMockTests : AutoCloseKoinTest() { @get:Rule diff --git a/projects/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/DeclareKoinContextFromExtensionTest.kt b/projects/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/DeclareKoinContextFromExtensionTest.kt index f9e456413..fbff5f2b6 100644 --- a/projects/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/DeclareKoinContextFromExtensionTest.kt +++ b/projects/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/DeclareKoinContextFromExtensionTest.kt @@ -11,7 +11,6 @@ import org.koin.test.KoinTest import org.koin.test.Simple import org.koin.test.inject -@Suppress("UNCHECKED_CAST") class DeclareKoinContextFromExtensionTest : KoinTest { @JvmField diff --git a/projects/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/DeclareMockTests.kt b/projects/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/DeclareMockTests.kt index 94b709b44..3349d612c 100644 --- a/projects/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/DeclareMockTests.kt +++ b/projects/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/DeclareMockTests.kt @@ -14,7 +14,6 @@ import org.koin.test.mock.declareMock import org.mockito.BDDMockito.given import org.mockito.Mockito -@Suppress("UNCHECKED_CAST") class DeclareMockTests : AutoCloseKoinTest() { @JvmField