update dependencies

This commit is contained in:
tursom 2022-01-06 15:29:32 +08:00
parent 370fb3d0f4
commit 3fb22b30bb
23 changed files with 63 additions and 32 deletions

View File

@ -1,7 +1,7 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.6.0"
kotlin("jvm") version "1.6.10"
`maven-publish`
id("ts-gradle")
}

View File

@ -8,9 +8,9 @@ dependencies {
api(kotlin("stdlib-jdk8"))
api(kotlin("reflect"))
api(group = "org.slf4j", name = "slf4j-api", version = "1.7.32")
compileOnly("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1")
compileOnly(group = "com.google.code.gson", name = "gson", version = "2.8.7")
compileOnly(group = "io.netty", name = "netty-all", version = "4.1.67.Final")
compileOnly("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0")
compileOnly(group = "com.google.code.gson", name = "gson", version = "2.8.9")
compileOnly(group = "io.netty", name = "netty-all", version = "4.1.72.Final")
testApi(group = "junit", name = "junit", version = "4.13.2")
}

View File

@ -9,13 +9,13 @@ dependencies {
api(project(":ts-core"))
api(project(":ts-core:ts-buffer"))
implementation(project(":ts-core:ts-xml"))
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1")
compileOnly("com.squareup.okhttp3:okhttp:4.9.1")
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0")
compileOnly("com.squareup.okhttp3:okhttp:4.9.3")
//api(group = "com.squareup.retrofit2", name = "converter-gson", version = "2.9.0")
//api(group = "com.squareup.retrofit2", name = "retrofit", version = "2.9.0")
// https://mvnrepository.com/artifact/org.jsoup/jsoup
api(group = "org.jsoup", name = "jsoup", version = "1.14.2")
api(group = "org.jsoup", name = "jsoup", version = "1.14.3")
testImplementation(project(":ts-core:ts-coroutine"))

View File

@ -7,7 +7,7 @@ plugins {
dependencies {
implementation(project(":ts-core:ts-log"))
implementation(project(":ts-core"))
compileOnly(group = "io.netty", name = "netty-all", version = "4.1.67.Final")
compileOnly(group = "io.netty", name = "netty-all", version = "4.1.72.Final")
}
artifacts {

View File

@ -6,7 +6,7 @@ plugins {
dependencies {
implementation(project(":ts-core"))
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1")
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0")
}

View File

@ -6,7 +6,7 @@ plugins {
dependencies {
implementation(project(":ts-core"))
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1")
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0")
}

View File

@ -7,7 +7,7 @@ plugins {
dependencies {
implementation(project(":"))
implementation(project(":ts-core"))
testImplementation(group = "junit", name = "junit", version = "4.13")
testImplementation(group = "junit", name = "junit", version = "4.13.2")
}

View File

@ -6,7 +6,7 @@ plugins {
dependencies {
api(project(":ts-core"))
compileOnly(group = "io.netty", name = "netty-all", version = "4.1.67.Final")
compileOnly(group = "io.netty", name = "netty-all", version = "4.1.72.Final")
}

View File

@ -0,0 +1,27 @@
package cn.tursom.core.delegation
import java.util.concurrent.locks.Lock
import java.util.concurrent.locks.ReentrantLock
import kotlin.reflect.KProperty
class ObjectLockMutableDelegatedField<in T, V>(
override val delegatedField: MutableDelegatedField<T, V>,
private val lock: Any,
) : MutableDelegatedField<T, V> by delegatedField, DecoratorMutableDelegatedField<T, V> {
constructor(
initValue: V,
lock: Lock = ReentrantLock(),
) : this(MutableDelegatedFieldValue(initValue), lock)
override fun getValue(thisRef: T, property: KProperty<*>): V = synchronized(lock) {
delegatedField.getValue(thisRef, property)
}
override fun setValue(thisRef: T, property: KProperty<*>, value: V) = synchronized(lock) {
delegatedField.setValue(thisRef, property, value)
}
override fun valueOnSet(thisRef: T, property: KProperty<*>, value: V, oldValue: V) = synchronized(lock) {
delegatedField.valueOnSet(thisRef, property, value, oldValue)
}
}

View File

@ -77,6 +77,9 @@ fun <T, V : Any> DelegatedField<T, V?>.notNull(ifNull: () -> Nothing): Delegated
fun <T, V : Any> MutableDelegatedField<T, out V?>.notNull(ifNull: () -> Nothing): MutableDelegatedField<T, V> =
NotNullMutableDelegatedField(uncheckedCast(), ifNull)
fun <T, V> MutableDelegatedField<T, V>.objectLocked(lock: Any): MutableDelegatedField<T, V> =
ObjectLockMutableDelegatedField(this, lock)
val <T, V> MutableDelegatedField<T, V>.locked: MutableDelegatedField<T, V> get() = LockMutableDelegatedField(this)
fun <T, V> MutableDelegatedField<T, V>.locked(lock: Lock = ReentrantLock()): MutableDelegatedField<T, V> =
LockMutableDelegatedField(this, lock)

View File

@ -6,9 +6,9 @@ plugins {
dependencies {
implementation(project(":"))
compileOnly(group = "com.google.code.gson", name = "gson", version = "2.8.7")
compileOnly(group = "com.fasterxml.jackson.core", name = "jackson-core", version = "2.12.4")
compileOnly(group = "com.fasterxml.jackson.core", name = "jackson-databind", version = "2.12.4")
compileOnly(group = "com.google.code.gson", name = "gson", version = "2.8.9")
compileOnly(group = "com.fasterxml.jackson.core", name = "jackson-core", version = "2.13.1")
compileOnly(group = "com.fasterxml.jackson.core", name = "jackson-databind", version = "2.13.1")
}

View File

@ -8,10 +8,10 @@ dependencies {
implementation(project(":ts-core"))
implementation(project(":ts-core:ts-delegation"))
api(group = "org.slf4j", name = "slf4j-api", version = "1.7.32")
api(group = "ch.qos.logback", name = "logback-core", version = "1.2.5")
api(group = "ch.qos.logback", name = "logback-classic", version = "1.2.5")
api(group = "ch.qos.logback", name = "logback-core", version = "1.2.10")
api(group = "ch.qos.logback", name = "logback-classic", version = "1.2.10")
compileOnly(group = "com.google.code.gson", name = "gson", version = "2.8.7")
compileOnly(group = "com.google.code.gson", name = "gson", version = "2.8.9")
}

View File

@ -9,7 +9,7 @@ dependencies {
api(project(":ts-core:ts-buffer"))
api(project(":ts-core:ts-log"))
compileOnly(project(":ts-socket"))
api(group = "io.netty", name = "netty-all", version = nettyVersion)
api(group = "io.netty", name = "netty-all", version = "4.1.72.Final")
}

View File

@ -12,8 +12,8 @@ dependencies {
implementation(project(":ts-core:ts-clone"))
implementation(project(":ts-core:ts-log"))
api(group = "org.ktorm", name = "ktorm-core", version = "3.4.1")
compileOnly(group = "com.baomidou", name = "mybatis-plus", version = "3.4.3.1")
compileOnly(group = "com.google.code.gson", name = "gson", version = "2.8.7")
compileOnly(group = "com.baomidou", name = "mybatis-plus", version = "3.4.3.4")
compileOnly(group = "com.google.code.gson", name = "gson", version = "2.8.9")
testApi(group = "junit", name = "junit", version = "4.13.2")
}

View File

@ -12,7 +12,7 @@ dependencies {
implementation(project(":ts-core:ts-clone"))
implementation(project(":ts-core:ts-log"))
api(group = "org.ktorm", name = "ktorm-core", version = "3.4.1")
compileOnly(group = "com.google.code.gson", name = "gson", version = "2.8.7")
compileOnly(group = "com.google.code.gson", name = "gson", version = "2.8.9")
testApi(group = "junit", name = "junit", version = "4.13.2")
}

View File

@ -9,8 +9,8 @@ dependencies {
implementation(project(":ts-core"))
implementation(project(":ts-core:ts-datastruct"))
implementation(project(":ts-core:ts-log"))
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1")
api(group = "org.mongodb", name = "mongodb-driver-reactivestreams", version = "4.3.0")
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0")
api(group = "org.mongodb", name = "mongodb-driver-reactivestreams", version = "4.4.0")
}

View File

@ -59,7 +59,8 @@ class CachedInsertMongoOperator<T : Any>(
@Suppress("EXPERIMENTAL_API_USAGE")
while (!documentChannel.isClosedForReceive) {
try {
list.add(documentChannel.poll() ?: withTimeout(maxDelayTimeMS) { documentChannel.receive() })
list.add(
documentChannel.tryReceive().getOrNull() ?: withTimeout(maxDelayTimeMS) { documentChannel.receive() })
received.incrementAndGet()
} catch (e: TimeoutCancellationException) {
} catch (e: ClosedReceiveChannelException) {

View File

@ -7,7 +7,7 @@ plugins {
dependencies {
api(project(":"))
implementation(project(":ts-core"))
compileOnly(group = "org.springframework.data", name = "spring-data-mongodb", version = "3.2.4")
compileOnly(group = "org.springframework.data", name = "spring-data-mongodb", version = "3.3.0")
}

View File

@ -11,8 +11,8 @@ dependencies {
implementation(project(":ts-core"))
implementation(project(":ts-core:ts-clone"))
implementation(project(":ts-core:ts-log"))
implementation(group = "com.baomidou", name = "mybatis-plus", version = "3.4.3.2")
compileOnly(group = "com.google.code.gson", name = "gson", version = "2.8.7")
implementation(group = "com.baomidou", name = "mybatis-plus", version = "3.4.3.4")
compileOnly(group = "com.google.code.gson", name = "gson", version = "2.8.9")
testApi(group = "junit", name = "junit", version = "4.13.2")
}

View File

@ -8,7 +8,7 @@ dependencies {
api(project(":"))
implementation(project(":ts-core"))
implementation(project(":ts-core:ts-log"))
api(group = "redis.clients", name = "jedis", version = "3.6.3")
api(group = "redis.clients", name = "jedis", version = "3.3.0")
}

View File

@ -10,7 +10,7 @@ dependencies {
implementation(project(":ts-core:ts-buffer"))
implementation(project(":ts-core:ts-pool"))
implementation(project(":ts-core:ts-log"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0")
}

View File

@ -11,7 +11,7 @@ dependencies {
implementation(project(":ts-core:ts-buffer"))
implementation(project(":ts-core:ts-json"))
implementation(group = "org.slf4j", name = "slf4j-api", version = "1.7.32")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0")
}

View File

@ -9,7 +9,7 @@ dependencies {
api(project(":ts-core:ts-buffer"))
api(project(":ts-core:ts-log"))
api(project(":ts-web"))
api(group = "io.netty", name = "netty-all", version = nettyVersion)
api(group = "io.netty", name = "netty-all", version = "4.1.72.Final")
api(group = "org.slf4j", name = "slf4j-api", version = "1.7.32")
}