mirror of
https://github.com/tursom/TursomServer.git
synced 2025-03-14 03:40:06 +08:00
update versions
This commit is contained in:
parent
9ed710458c
commit
2cd4d0353b
@ -1,7 +1,7 @@
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
kotlin("jvm") version "1.9.0"
|
||||
kotlin("jvm") version "1.9.20-RC2"
|
||||
id("ts-gradle")
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ allprojects {
|
||||
useTursomRepositories()
|
||||
|
||||
tasks.withType<KotlinCompile>().configureEach {
|
||||
kotlinOptions.jvmTarget = "17"
|
||||
//kotlinOptions.jvmTarget = "21"
|
||||
kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
|
||||
//kotlinOptions.useIR = true
|
||||
}
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
@ -35,24 +35,25 @@ include("ts-database:ts-mybatisplus")
|
||||
include("ts-database:ts-mongodb")
|
||||
include("ts-database:ts-mongodb:ts-mongodb-spring")
|
||||
include("ts-database:ts-redis")
|
||||
//include("web", "aop", "database", "utils", "utils:xml", "utils:async-http", "web:netty-web")
|
||||
//include("socket", "socket:socket-async")
|
||||
//include("AsyncSocket")
|
||||
//include("log")
|
||||
//include("json")
|
||||
//include("utils:yaml")
|
||||
//include("web:web-coroutine")
|
||||
//include("microservices")
|
||||
//include("database:database-mysql")
|
||||
//include("database:mongodb")
|
||||
//include("database:mongodb:mongodb-async")
|
||||
//include("database:redis")
|
||||
//include("utils:ws-client")
|
||||
//include("utils:mail")
|
||||
//include("utils:csv")
|
||||
//include("utils:delegation")
|
||||
//include("utils:observer")
|
||||
//include("utils:TrafficForward")
|
||||
//include("utils:performance-test")
|
||||
//include("utils:math")
|
||||
//include("utils:json")
|
||||
|
||||
dependencyResolutionManagement {
|
||||
versionCatalogs {
|
||||
create("libs") {
|
||||
val kotlinCoroutineVersion = "1.7.3"
|
||||
version("kotlin-coroutines", kotlinCoroutineVersion)
|
||||
library(
|
||||
"kotlin-coroutines-core",
|
||||
"org.jetbrains.kotlinx",
|
||||
"kotlinx-coroutines-core"
|
||||
).versionRef("kotlin-coroutines")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pluginManagement {
|
||||
repositories {
|
||||
maven {
|
||||
url = uri("https://jmp.mvn.tursom.cn:20080/repository/maven-public/")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,4 @@
|
||||
package cn.tursom.proxy.function;
|
||||
|
||||
public class Main {
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
package cn.tursom.proxy.interceptor
|
||||
|
||||
import cn.tursom.reflect.asm.ReflectAsmInvoker
|
||||
import cn.tursom.reflect.asm.ReflectAsmUtils
|
||||
import com.esotericsoftware.reflectasm.MethodAccess
|
||||
import net.sf.cglib.proxy.InvocationHandler
|
||||
import java.lang.reflect.Method
|
||||
|
||||
class LocalCachedNoProxyInvocationHandler(
|
||||
val proxy: Any,
|
||||
) : InvocationHandler {
|
||||
private var handler: (method: Method?, args: Array<out Any>?) -> Any? = DefaultHandler()
|
||||
|
||||
override fun invoke(ignore: Any, method: Method?, args: Array<out Any>?): Any? {
|
||||
return handler(method, args)
|
||||
}
|
||||
|
||||
private inner class DefaultHandler : (Method?, Array<out Any>?) -> Any? {
|
||||
override fun invoke(method: Method?, args: Array<out Any>?): Any? {
|
||||
method!!
|
||||
|
||||
val (methodAccess, index) = ReflectAsmUtils.getMethodByRegex(
|
||||
proxy.javaClass,
|
||||
"CGLIB\\\$${method.name}\\\$.*".toRegex(),
|
||||
*method.parameterTypes,
|
||||
method.returnType,
|
||||
)!!
|
||||
handler = MethodAccessHandler(methodAccess, index)
|
||||
return ReflectAsmInvoker.invoke(methodAccess, proxy, index, args)
|
||||
}
|
||||
}
|
||||
|
||||
private inner class MethodAccessHandler(
|
||||
private val methodAccess: MethodAccess,
|
||||
private val index: Int,
|
||||
) : (Method?, Array<out Any>?) -> Any? {
|
||||
override fun invoke(method: Method?, args: Array<out Any>?) =
|
||||
ReflectAsmInvoker.invoke(methodAccess, proxy, index, args)
|
||||
}
|
||||
}
|
@ -7,7 +7,10 @@ import java.lang.reflect.Method
|
||||
class NoProxyProxyInterceptor(
|
||||
private val target: Any,
|
||||
) : MethodInterceptor {
|
||||
override fun intercept(obj: Any?, method: Method?, args: Array<out Any>?, proxy: MethodProxy): Any? {
|
||||
return proxy.invokeSuper(target, args)
|
||||
}
|
||||
override fun intercept(
|
||||
obj: Any?,
|
||||
method: Method?,
|
||||
args: Array<out Any>?,
|
||||
proxy: MethodProxy,
|
||||
): Any? = proxy.invokeSuper(target, args)
|
||||
}
|
15
ts-core/ts-proxy/src/test/kotlin/cn/tursom/proxy/main.kt
Normal file
15
ts-core/ts-proxy/src/test/kotlin/cn/tursom/proxy/main.kt
Normal file
@ -0,0 +1,15 @@
|
||||
package cn.tursom.proxy
|
||||
|
||||
|
||||
fun b() {
|
||||
repeat(9) { i -> repeat(i) { j -> print("$j*$i=${i * j} ") };println() }
|
||||
}
|
||||
|
||||
fun a() {
|
||||
repeat(9) { i -> repeat(i) { j -> print("$j*$i=${i * j} ") };println() }
|
||||
}
|
||||
|
||||
fun main() {
|
||||
(1..9).map { i -> println((1..i).map { "$it*$i=${i * it}" }) }
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ dependencies {
|
||||
implementation(project(":ts-core"))
|
||||
implementation(project(":ts-core:ts-datastruct"))
|
||||
implementation(project(":ts-core:ts-log"))
|
||||
api(group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version = coroutineVersion)
|
||||
api(libs.kotlin.coroutines.core)
|
||||
api(group = "org.mongodb", name = "mongodb-driver-reactivestreams", version = "4.4.0")
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
import java.util.*
|
||||
|
||||
plugins {
|
||||
kotlin("jvm") version "1.7.10"
|
||||
kotlin("jvm") version "1.9.10"
|
||||
`java-gradle-plugin`
|
||||
`maven-publish`
|
||||
}
|
||||
@ -22,7 +22,7 @@ try {
|
||||
|
||||
group = "cn.tursom"
|
||||
//version = SimpleDateFormat("yy.MM.dd-HH.mm").format(Date())
|
||||
version = "1.0-SNAPSHOT"
|
||||
version = "1.1-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
|
7
ts-gradle/settings.gradle.kts
Normal file
7
ts-gradle/settings.gradle.kts
Normal file
@ -0,0 +1,7 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
maven {
|
||||
url = uri("https://jmp.mvn.tursom.cn:20080/repository/maven-public/")
|
||||
}
|
||||
}
|
||||
}
|
@ -14,6 +14,7 @@ dependencies {
|
||||
api(project(":ts-web"))
|
||||
api(project(":ts-web:ts-web-netty"))
|
||||
api(project(":ts-core:ts-coroutine"))
|
||||
api(libs.kotlin.coroutines.core)
|
||||
api(group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version = coroutineVersion)
|
||||
api(group = "io.netty", name = "netty-all", version = nettyVersion)
|
||||
api(group = "org.slf4j", name = "slf4j-api", version = "1.7.32")
|
||||
|
Loading…
Reference in New Issue
Block a user