2023-03-24 03:58:12 +00:00
|
|
|
val ktor_version: String by project
|
|
|
|
val kotlin_version: String by project
|
|
|
|
val logback_version: String by project
|
|
|
|
val exposed_version: String by project
|
|
|
|
val h2_version: String by project
|
|
|
|
val koin_version: String by project
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
kotlin("jvm") version "1.8.10"
|
|
|
|
id("io.ktor.plugin") version "2.2.4"
|
|
|
|
// id("org.jetbrains.kotlin.plugin.serialization") version "1.8.10"
|
|
|
|
}
|
|
|
|
|
|
|
|
group = "dev.usbharu"
|
|
|
|
version = "0.0.1"
|
|
|
|
application {
|
|
|
|
mainClass.set("io.ktor.server.netty.EngineMain")
|
|
|
|
|
|
|
|
val isDevelopment: Boolean = project.ext.has("development")
|
|
|
|
applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment")
|
|
|
|
}
|
|
|
|
|
2023-03-30 11:55:12 +00:00
|
|
|
tasks.withType<Test> {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
|
2023-03-24 03:58:12 +00:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
2023-04-05 07:59:16 +00:00
|
|
|
kotlin {
|
|
|
|
target {
|
|
|
|
compilations.all {
|
|
|
|
kotlinOptions.jvmTarget = JavaVersion.VERSION_11.toString()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-03-24 03:58:12 +00:00
|
|
|
dependencies {
|
|
|
|
implementation("io.ktor:ktor-server-core-jvm:$ktor_version")
|
|
|
|
implementation("io.ktor:ktor-server-auth-jvm:$ktor_version")
|
|
|
|
implementation("io.ktor:ktor-server-sessions-jvm:$ktor_version")
|
|
|
|
implementation("io.ktor:ktor-server-auto-head-response-jvm:$ktor_version")
|
|
|
|
implementation("io.ktor:ktor-server-cors-jvm:$ktor_version")
|
|
|
|
implementation("io.ktor:ktor-server-default-headers-jvm:$ktor_version")
|
|
|
|
implementation("io.ktor:ktor-server-forwarded-header-jvm:$ktor_version")
|
|
|
|
implementation("io.ktor:ktor-server-call-logging-jvm:$ktor_version")
|
|
|
|
implementation("io.ktor:ktor-server-content-negotiation-jvm:$ktor_version")
|
|
|
|
implementation("io.ktor:ktor-serialization-jackson:$ktor_version")
|
|
|
|
implementation("org.jetbrains.exposed:exposed-core:$exposed_version")
|
|
|
|
implementation("org.jetbrains.exposed:exposed-jdbc:$exposed_version")
|
|
|
|
implementation("com.h2database:h2:$h2_version")
|
|
|
|
implementation("org.xerial:sqlite-jdbc:3.40.1.0")
|
|
|
|
implementation("io.ktor:ktor-server-websockets-jvm:$ktor_version")
|
|
|
|
implementation("io.ktor:ktor-server-netty-jvm:$ktor_version")
|
|
|
|
implementation("ch.qos.logback:logback-classic:$logback_version")
|
|
|
|
|
|
|
|
implementation("io.insert-koin:koin-core:$koin_version")
|
|
|
|
implementation("io.insert-koin:koin-ktor:$koin_version")
|
|
|
|
implementation("io.insert-koin:koin-logger-slf4j:$koin_version")
|
2023-03-30 11:01:04 +00:00
|
|
|
implementation("io.ktor:ktor-client-logging-jvm:2.2.4")
|
2023-04-07 08:45:53 +00:00
|
|
|
implementation("io.ktor:ktor-server-host-common-jvm:2.2.4")
|
|
|
|
implementation("io.ktor:ktor-server-status-pages-jvm:2.2.4")
|
2023-03-24 03:58:12 +00:00
|
|
|
|
|
|
|
testImplementation("io.ktor:ktor-server-tests-jvm:$ktor_version")
|
|
|
|
testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version")
|
2023-04-12 06:46:45 +00:00
|
|
|
testImplementation ("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4")
|
2023-04-12 12:53:49 +00:00
|
|
|
testImplementation("io.ktor:ktor-client-mock:$ktor_version")
|
2023-03-30 06:33:19 +00:00
|
|
|
|
|
|
|
implementation("io.ktor:ktor-client-core:$ktor_version")
|
|
|
|
implementation("io.ktor:ktor-client-cio:$ktor_version")
|
2023-03-30 11:01:04 +00:00
|
|
|
implementation("io.ktor:ktor-client-content-negotiation:$ktor_version")
|
2023-03-31 07:25:08 +00:00
|
|
|
testImplementation("io.ktor:ktor-client-mock:$ktor_version")
|
2023-03-31 03:23:58 +00:00
|
|
|
implementation("tech.barbero.http-messages-signing:http-messages-signing-core:1.0.0")
|
|
|
|
|
2023-03-30 11:55:12 +00:00
|
|
|
testImplementation("org.junit.jupiter:junit-jupiter:5.8.1")
|
2023-04-10 02:37:08 +00:00
|
|
|
testImplementation("org.mockito.kotlin:mockito-kotlin:4.1.0")
|
|
|
|
testImplementation("org.mockito:mockito-inline:5.2.0")
|
|
|
|
|
2023-04-05 07:59:16 +00:00
|
|
|
|
|
|
|
implementation("org.drewcarlson:kjob-core:0.6.0")
|
2023-04-07 04:00:29 +00:00
|
|
|
testImplementation("io.ktor:ktor-server-test-host-jvm:2.2.4")
|
|
|
|
|
|
|
|
testImplementation("org.slf4j:slf4j-simple:2.0.7")
|
|
|
|
|
2023-03-24 03:58:12 +00:00
|
|
|
}
|
2023-03-24 04:09:43 +00:00
|
|
|
|
|
|
|
jib {
|
|
|
|
if (System.getProperty("os.name").toLowerCase().contains("windows")) {
|
|
|
|
dockerClient.environment = mapOf(
|
|
|
|
"DOCKER_HOST" to "localhost:2375"
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ktor {
|
|
|
|
docker {
|
|
|
|
localImageName.set("hideout")
|
|
|
|
}
|
|
|
|
}
|