-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
101 lines (83 loc) · 2.68 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
application
`maven-publish`
kotlin("jvm") version "1.9.21"
kotlin("plugin.serialization") version "1.9.21"
id("com.github.johnrengelman.shadow") version "8.1.1"
}
group = "wstunnel"
version = "1.0.0-SNAPSHOT"
java {
sourceCompatibility = JavaVersion.VERSION_1_8
}
application {
mainClass.set("wstunnel.MainKt")
}
repositories {
mavenCentral()
}
val ktorVersion = "2.3.7"
val sshdVersion = "2.11.0"
val kotestVersion = "5.8.0"
dependencies {
implementation("ch.qos.logback:logback-classic:1.4.14")
implementation("io.github.microutils:kotlin-logging:3.0.5")
implementation("org.jetbrains.kotlinx:kotlinx-cli:0.3.6")
implementation("org.apache.sshd:sshd-core:$sshdVersion")
implementation("org.apache.sshd:sshd-sftp:$sshdVersion")
implementation("io.ktor:ktor-server-cio:$ktorVersion")
implementation("io.ktor:ktor-server-core:$ktorVersion")
implementation("io.ktor:ktor-server-websockets:$ktorVersion")
implementation("io.ktor:ktor-client-core:$ktorVersion")
implementation("io.ktor:ktor-client-cio:$ktorVersion")
implementation("io.ktor:ktor-client-websockets:$ktorVersion")
implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion")
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion")
implementation("io.ktor:ktor-network:$ktorVersion")
testImplementation("io.ktor:ktor-server-tests:$ktorVersion")
testImplementation("io.kotest:kotest-runner-junit5:$kotestVersion")
testImplementation("io.kotest:kotest-assertions-core:$kotestVersion")
testImplementation("io.kotest:kotest-assertions-json:$kotestVersion")
testImplementation("io.mockk:mockk:1.13.8")
}
tasks {
withType<KotlinCompile>().all {
with(kotlinOptions) {
jvmTarget = "1.8"
freeCompilerArgs = freeCompilerArgs + listOf(
"-Xjsr305=strict",
)
}
}
withType<Test> {
useJUnitPlatform()
}
withType<Jar> {
archiveFileName.set("wstunnel.jar")
manifest {
attributes(
mapOf(
"Main-Class" to application.mainClass.get()
)
)
}
}
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/denyshorman/wstunnel")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
publications {
create<MavenPublication>("maven") {
from(components["java"])
}
}
}