This commit is contained in:
tursom 2021-04-11 18:56:37 +08:00
parent 8881cd5056
commit c3f421c2f8
38 changed files with 82 additions and 19 deletions

View File

@ -6,6 +6,7 @@ include("ts-core:ts-datastruct")
include("ts-core:ts-pool")
include("ts-core:ts-hash")
include("ts-core:ts-log")
include("ts-core:ts-delegation")
include("ts-socket")
//include("web", "aop", "database", "utils", "utils:xml", "utils:async-http", "web:netty-web")
//include("socket", "socket:socket-async")

View File

@ -10,6 +10,10 @@ dependencies {
@kotlin.Suppress("UNCHECKED_CAST")
(rootProject.ext["excludeTest"] as (Project, TaskContainer) -> Unit)(project, tasks)
tasks.register("install") {
finalizedBy(tasks["publishToMavenLocal"])
}
publishing {
publications {
create<MavenPublication>("maven") {

View File

@ -11,6 +11,10 @@ dependencies {
@kotlin.Suppress("UNCHECKED_CAST")
(rootProject.ext["excludeTest"] as (Project, TaskContainer) -> Unit)(project, tasks)
tasks.register("install") {
finalizedBy(tasks["publishToMavenLocal"])
}
publishing {
publications {
create<MavenPublication>("maven") {

View File

@ -0,0 +1,31 @@
plugins {
kotlin("jvm")
`maven-publish`
}
dependencies {
api(project(":ts-core"))
}
@kotlin.Suppress("UNCHECKED_CAST")
(rootProject.ext["excludeTest"] as (Project, TaskContainer) -> Unit)(project, tasks)
tasks.register("install") {
finalizedBy(tasks["publishToMavenLocal"])
}
publishing {
publications {
create<MavenPublication>("maven") {
groupId = project.group.toString()
artifactId = project.name
version = project.version.toString()
from(components["java"])
try {
artifact(tasks["sourcesJar"])
} catch (e: Exception) {
}
}
}
}

View File

@ -13,6 +13,10 @@ dependencies {
@kotlin.Suppress("UNCHECKED_CAST")
(rootProject.ext["excludeTest"] as (Project, TaskContainer) -> Unit)(project, tasks)
tasks.register("install") {
finalizedBy(tasks["publishToMavenLocal"])
}
publishing {
publications {
create<MavenPublication>("maven") {

View File

@ -1,9 +1,7 @@
package cn.tursom.core.encrypt
import cn.tursom.core.toHexString
import cn.tursom.core.toUTF8String
import java.security.*
import java.security.interfaces.RSAPublicKey
import java.security.spec.X509EncodedKeySpec
import javax.crypto.Cipher
import kotlin.experimental.xor

View File

@ -11,6 +11,10 @@ dependencies {
@kotlin.Suppress("UNCHECKED_CAST")
(rootProject.ext["excludeTest"] as (Project, TaskContainer) -> Unit)(project, tasks)
tasks.register("install") {
finalizedBy(tasks["publishToMavenLocal"])
}
publishing {
publications {
create<MavenPublication>("maven") {

View File

@ -13,6 +13,10 @@ dependencies {
@kotlin.Suppress("UNCHECKED_CAST")
(rootProject.ext["excludeTest"] as (Project, TaskContainer) -> Unit)(project, tasks)
tasks.register("install") {
finalizedBy(tasks["publishToMavenLocal"])
}
publishing {
publications {
create<MavenPublication>("maven") {

View File

@ -11,6 +11,10 @@ dependencies {
@kotlin.Suppress("UNCHECKED_CAST")
(rootProject.ext["excludeTest"] as (Project, TaskContainer) -> Unit)(project, tasks)
tasks.register("install") {
finalizedBy(tasks["publishToMavenLocal"])
}
publishing {
publications {
create<MavenPublication>("maven") {

View File

@ -1,5 +1,6 @@
plugins {
kotlin("jvm")
`maven-publish`
}
dependencies {
@ -13,3 +14,22 @@ dependencies {
@kotlin.Suppress("UNCHECKED_CAST")
(rootProject.ext["excludeTest"] as (Project, TaskContainer) -> Unit)(project, tasks)
tasks.register("install") {
finalizedBy(tasks["publishToMavenLocal"])
}
publishing {
publications {
create<MavenPublication>("maven") {
groupId = project.group.toString()
artifactId = project.name
version = project.version.toString()
from(components["java"])
try {
artifact(tasks["sourcesJar"])
} catch (e: Exception) {
}
}
}
}

View File

@ -3,19 +3,12 @@ package cn.tursom.channel
import cn.tursom.buffer.MultipleByteBuffer
import cn.tursom.core.buffer.ByteBuffer
import cn.tursom.core.buffer.impl.HeapByteBuffer
import cn.tursom.core.buffer.read
import cn.tursom.core.pool.MemoryPool
import cn.tursom.core.timer.Timer
import cn.tursom.core.timer.WheelTimer
import cn.tursom.niothread.NioThread
import java.io.Closeable
import java.net.SocketAddress
import java.net.SocketException
import java.nio.channels.*
import java.nio.channels.FileChannel
import java.nio.charset.Charset
import java.util.concurrent.TimeoutException
import kotlin.coroutines.resumeWithException
import kotlin.coroutines.suspendCoroutine
interface AsyncChannel : Closeable {
val open: Boolean

View File

@ -1,15 +1,15 @@
package cn.tursom.socket.security
import cn.tursom.channel.enhance.EnhanceChannel
import cn.tursom.channel.enhance.impl.ByteArrayWriter
import cn.tursom.channel.enhance.impl.ChannelReaderImpl
import cn.tursom.channel.enhance.impl.ChannelWriterImpl
import cn.tursom.core.buffer.impl.HeapByteBuffer
import cn.tursom.core.encrypt.AES
import cn.tursom.core.encrypt.PublicKeyEncrypt
import cn.tursom.core.encrypt.RSA
import cn.tursom.core.pool.HeapMemoryPool
import cn.tursom.socket.AsyncSocket
import cn.tursom.channel.enhance.EnhanceChannel
import cn.tursom.channel.enhance.impl.ByteArrayWriter
import cn.tursom.channel.enhance.impl.ChannelReaderImpl
import cn.tursom.channel.enhance.impl.ChannelWriterImpl
object AsyncSocketSecurityUtil {
private val memoryPool = HeapMemoryPool(4096)

View File

@ -1,9 +1,9 @@
package cn.tursom.socket.server
import cn.tursom.channel.AsyncProtocol
import cn.tursom.niothread.NioProtocol
import cn.tursom.niothread.NioThread
import cn.tursom.socket.AsyncSocket
import cn.tursom.niothread.NioProtocol
import cn.tursom.socket.NioSocket
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.GlobalScope

View File

@ -1,4 +0,0 @@
dependencies {
compile project(":")
api "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
}