mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-12-23 09:07:14 +00:00
commit
b3a93e17eb
@ -1,5 +1,14 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.19.4
|
||||||
|
|
||||||
|
* `Versions`:
|
||||||
|
* `Koin`: `3.4.1` -> `3.4.2`
|
||||||
|
* `Android Fragments`: `1.5.7` -> `1.6.0`
|
||||||
|
* `Koin`
|
||||||
|
* `Generator`
|
||||||
|
* Fixes in new generic generator part
|
||||||
|
|
||||||
## 0.19.3
|
## 0.19.3
|
||||||
|
|
||||||
* `Koin`
|
* `Koin`
|
||||||
|
@ -14,5 +14,5 @@ crypto_js_version=4.1.1
|
|||||||
# Project data
|
# Project data
|
||||||
|
|
||||||
group=dev.inmo
|
group=dev.inmo
|
||||||
version=0.19.3
|
version=0.19.4
|
||||||
android_code_version=199
|
android_code_version=200
|
||||||
|
@ -17,7 +17,7 @@ ktor = "2.3.1"
|
|||||||
|
|
||||||
gh-release = "2.4.1"
|
gh-release = "2.4.1"
|
||||||
|
|
||||||
koin = "3.4.1"
|
koin = "3.4.2"
|
||||||
|
|
||||||
okio = "3.3.0"
|
okio = "3.3.0"
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ dexcount = "4.0.0"
|
|||||||
android-coreKtx = "1.10.1"
|
android-coreKtx = "1.10.1"
|
||||||
android-recyclerView = "1.3.0"
|
android-recyclerView = "1.3.0"
|
||||||
android-appCompat = "1.6.1"
|
android-appCompat = "1.6.1"
|
||||||
android-fragment = "1.5.7"
|
android-fragment = "1.6.0"
|
||||||
android-espresso = "3.5.1"
|
android-espresso = "3.5.1"
|
||||||
android-test = "1.1.5"
|
android-test = "1.1.5"
|
||||||
|
|
||||||
|
@ -13,3 +13,8 @@ dependencies {
|
|||||||
api libs.kotlin.poet
|
api libs.kotlin.poet
|
||||||
api libs.ksp
|
api libs.ksp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
java {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
@ -127,7 +127,7 @@ class Processor(
|
|||||||
addModifiers(KModifier.INLINE)
|
addModifiers(KModifier.INLINE)
|
||||||
targetTypeAsGenericType ?.let {
|
targetTypeAsGenericType ?.let {
|
||||||
addTypeVariable(it)
|
addTypeVariable(it)
|
||||||
returns(it)
|
returns(it.copy(nullable = nullable))
|
||||||
} ?: returns(targetType)
|
} ?: returns(targetType)
|
||||||
addCode(
|
addCode(
|
||||||
"return " + (if (nullable) {
|
"return " + (if (nullable) {
|
||||||
|
@ -97,3 +97,28 @@ public inline fun <reified T : Any> Module.singleTest(createdAtStart: Boolean =
|
|||||||
*/
|
*/
|
||||||
public inline fun <reified T : Any> Module.factoryTest(noinline definition: Definition<T>):
|
public inline fun <reified T : Any> Module.factoryTest(noinline definition: Definition<T>):
|
||||||
KoinDefinition<T> = factory(named("test"), definition = definition)
|
KoinDefinition<T> = factory(named("test"), definition = definition)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Definition by key "testNullable" with [parameters]
|
||||||
|
*/
|
||||||
|
public inline fun <reified T : Any> Scope.testNullable(noinline parameters: ParametersDefinition? =
|
||||||
|
null): T? = getOrNull(named("testNullable"), parameters)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Definition by key "testNullable" with [parameters]
|
||||||
|
*/
|
||||||
|
public inline fun <reified T : Any> Koin.testNullable(noinline parameters: ParametersDefinition? =
|
||||||
|
null): T? = getOrNull(named("testNullable"), parameters)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Will register [definition] with [org.koin.core.module.Module.single] and key "testNullable"
|
||||||
|
*/
|
||||||
|
public inline fun <reified T : Any> Module.singleTestNullable(createdAtStart: Boolean = false,
|
||||||
|
noinline definition: Definition<T>): KoinDefinition<T> = single(named("testNullable"),
|
||||||
|
createdAtStart = createdAtStart, definition = definition)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Will register [definition] with [org.koin.core.module.Module.factory] and key "testNullable"
|
||||||
|
*/
|
||||||
|
public inline fun <reified T : Any> Module.factoryTestNullable(noinline definition: Definition<T>):
|
||||||
|
KoinDefinition<T> = factory(named("testNullable"), definition = definition)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
@file:GenerateKoinDefinition("sampleInfo", Test::class, String::class, nullable = false)
|
@file:GenerateKoinDefinition("sampleInfo", Test::class, String::class, nullable = false)
|
||||||
@file:GenerateGenericKoinDefinition("test", nullable = false)
|
@file:GenerateGenericKoinDefinition("test", nullable = false)
|
||||||
|
@file:GenerateGenericKoinDefinition("testNullable", nullable = true)
|
||||||
package dev.inmo.micro_utils.koin.generator.test
|
package dev.inmo.micro_utils.koin.generator.test
|
||||||
|
|
||||||
import dev.inmo.micro_utils.koin.annotations.GenerateGenericKoinDefinition
|
import dev.inmo.micro_utils.koin.annotations.GenerateGenericKoinDefinition
|
||||||
|
@ -14,3 +14,8 @@ dependencies {
|
|||||||
api libs.kotlin.poet
|
api libs.kotlin.poet
|
||||||
api libs.ksp
|
api libs.ksp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
java {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user