mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-11-22 08:13:49 +00:00
Warning annotation
This commit is contained in:
parent
b82c3864a0
commit
091bb1394f
@ -2,6 +2,8 @@
|
||||
|
||||
## 0.4.6
|
||||
|
||||
* `Common`
|
||||
* New annotation `Warning` has been added
|
||||
* `Pagination`
|
||||
* `Common`
|
||||
* `Pagination` got new extension: `Pagination#isFirstPage`
|
||||
|
@ -17,3 +17,21 @@ package dev.inmo.micro_utils.common
|
||||
AnnotationTarget.TYPE_PARAMETER
|
||||
)
|
||||
annotation class PreviewFeature
|
||||
|
||||
@RequiresOptIn(
|
||||
"This thing is marked as warned. See message of warn to get more info",
|
||||
RequiresOptIn.Level.WARNING
|
||||
)
|
||||
@Target(
|
||||
AnnotationTarget.CLASS,
|
||||
AnnotationTarget.CONSTRUCTOR,
|
||||
AnnotationTarget.FIELD,
|
||||
AnnotationTarget.PROPERTY,
|
||||
AnnotationTarget.PROPERTY_GETTER,
|
||||
AnnotationTarget.PROPERTY_SETTER,
|
||||
AnnotationTarget.FUNCTION,
|
||||
AnnotationTarget.TYPE,
|
||||
AnnotationTarget.TYPEALIAS,
|
||||
AnnotationTarget.TYPE_PARAMETER
|
||||
)
|
||||
annotation class Warning(val message: String)
|
||||
|
@ -17,6 +17,11 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
jvmMain {
|
||||
dependencies {
|
||||
api internalProject("micro_utils.common")
|
||||
}
|
||||
}
|
||||
androidMain {
|
||||
dependencies {
|
||||
api "androidx.core:core-ktx:$core_ktx_version"
|
||||
|
@ -1,5 +1,6 @@
|
||||
package dev.inmo.micro_utils.repos
|
||||
|
||||
import dev.inmo.micro_utils.common.Warning
|
||||
import dev.inmo.micro_utils.pagination.*
|
||||
import dev.inmo.micro_utils.pagination.utils.reverse
|
||||
import kotlinx.coroutines.*
|
||||
@ -81,6 +82,7 @@ class FileReadStandardKeyValueRepo(
|
||||
/**
|
||||
* Files watching will not correctly works on Android with version of API lower than API 26
|
||||
*/
|
||||
@Warning("Files watching will not correctly works on Android Platform with version of API lower than API 26")
|
||||
class FileWriteStandardKeyValueRepo(
|
||||
private val folder: File,
|
||||
filesChangedProcessingScope: CoroutineScope? = null
|
||||
@ -160,6 +162,7 @@ class FileWriteStandardKeyValueRepo(
|
||||
}
|
||||
}
|
||||
|
||||
@Warning("Files watching will not correctly works on Android Platform with version of API lower than API 26")
|
||||
class FileStandardKeyValueRepo(
|
||||
folder: File,
|
||||
filesChangedProcessingScope: CoroutineScope? = null
|
||||
|
Loading…
Reference in New Issue
Block a user