2024-02-29 23:29:55 +08:00
|
|
|
|
2023-01-08 00:27:56 +08:00
|
|
|
import java.time.Instant
|
|
|
|
import java.time.ZoneId
|
2024-02-29 23:29:55 +08:00
|
|
|
import java.time.format.DateTimeFormatter
|
2023-01-08 00:27:56 +08:00
|
|
|
|
|
|
|
plugins {
|
|
|
|
java
|
2024-02-10 18:29:31 +08:00
|
|
|
kotlin("plugin.lombok") version "1.9.22"
|
|
|
|
kotlin("jvm") version "1.9.22"
|
2024-02-17 06:03:52 +08:00
|
|
|
kotlin("plugin.spring") version "1.9.22"
|
2024-02-17 12:55:30 +08:00
|
|
|
kotlin("plugin.serialization") version "1.9.22"
|
2024-02-17 06:03:52 +08:00
|
|
|
id("io.freefair.lombok") version "8.6"
|
|
|
|
id("org.springframework.boot") version "3.2.2"
|
|
|
|
id("com.github.ben-manes.versions") version "0.51.0"
|
2023-01-08 00:27:56 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
apply(plugin = "io.spring.dependency-management")
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
// Spring boot
|
|
|
|
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
|
|
|
|
implementation("org.springframework.boot:spring-boot-starter-security")
|
|
|
|
implementation("org.springframework.boot:spring-boot-starter-web") {
|
|
|
|
exclude(group = "org.springframework.boot", module = "spring-boot-starter-tomcat")
|
|
|
|
}
|
|
|
|
implementation("org.springframework.boot:spring-boot-starter-jetty")
|
|
|
|
implementation("io.netty:netty-all")
|
2024-02-17 06:03:52 +08:00
|
|
|
implementation("org.apache.commons:commons-lang3:3.14.0")
|
|
|
|
implementation("org.apache.httpcomponents.client5:httpclient5")
|
|
|
|
implementation("org.flywaydb:flyway-core:10.8.1")
|
|
|
|
implementation("org.flywaydb:flyway-mysql:10.8.1")
|
2023-01-08 00:27:56 +08:00
|
|
|
testImplementation("org.springframework.boot:spring-boot-starter-test") {
|
|
|
|
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
|
|
|
|
}
|
|
|
|
testImplementation("org.springframework.security:spring-security-test")
|
2024-02-17 06:03:52 +08:00
|
|
|
|
2023-01-08 00:27:56 +08:00
|
|
|
// Database
|
2024-02-17 04:54:09 +08:00
|
|
|
runtimeOnly("org.mariadb.jdbc:mariadb-java-client:3.3.2")
|
|
|
|
runtimeOnly("org.xerial:sqlite-jdbc:3.45.1.0")
|
2024-02-17 06:03:52 +08:00
|
|
|
implementation("org.hibernate.orm:hibernate-core:6.4.4.Final")
|
|
|
|
implementation("org.hibernate.orm:hibernate-community-dialects:6.4.4.Final")
|
|
|
|
|
2023-03-03 16:35:14 +08:00
|
|
|
// JSR305 for nullable
|
2023-01-08 00:27:56 +08:00
|
|
|
implementation("com.google.code.findbugs:jsr305:3.0.2")
|
2024-02-17 12:55:30 +08:00
|
|
|
|
2024-02-19 14:35:34 +08:00
|
|
|
// =============================
|
2024-02-17 12:55:30 +08:00
|
|
|
// AquaNet Specific Dependencies
|
2024-02-19 14:35:34 +08:00
|
|
|
// =============================
|
|
|
|
|
|
|
|
// Network
|
2024-02-17 12:55:30 +08:00
|
|
|
implementation("io.ktor:ktor-client-core:2.3.8")
|
|
|
|
implementation("io.ktor:ktor-client-cio:2.3.8")
|
|
|
|
implementation("io.ktor:ktor-client-content-negotiation:2.3.8")
|
|
|
|
implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.8")
|
2024-02-17 14:43:52 +08:00
|
|
|
implementation("org.jetbrains.kotlin:kotlin-reflect:1.9.22")
|
2024-02-17 17:04:14 +08:00
|
|
|
|
2024-02-19 15:26:20 +08:00
|
|
|
// Somehow these are needed for ktor even though they're not in the documentation
|
|
|
|
runtimeOnly("org.reactivestreams:reactive-streams:1.0.4")
|
|
|
|
runtimeOnly("org.jetbrains.kotlinx:kotlinx-coroutines-reactor:1.8.0")
|
|
|
|
|
2024-02-17 17:04:14 +08:00
|
|
|
// Email
|
|
|
|
implementation("org.simplejavamail:simple-java-mail:8.6.3")
|
|
|
|
implementation("org.simplejavamail:spring-module:8.6.3")
|
2024-02-19 14:35:34 +08:00
|
|
|
|
|
|
|
// GeoIP
|
|
|
|
implementation("com.maxmind.geoip2:geoip2:4.2.0")
|
2024-02-19 15:40:00 +08:00
|
|
|
|
|
|
|
// JWT Authentication
|
|
|
|
implementation("io.jsonwebtoken:jjwt-api:0.12.5")
|
|
|
|
runtimeOnly("io.jsonwebtoken:jjwt-impl:0.12.5")
|
|
|
|
runtimeOnly("io.jsonwebtoken:jjwt-jackson:0.12.5")
|
2023-01-08 00:27:56 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
group = "icu.samnya"
|
2024-03-03 13:00:33 +08:00
|
|
|
version = "1.0.0"
|
|
|
|
description = "AquaDX Arcade Server"
|
2023-01-08 00:27:56 +08:00
|
|
|
java.sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
|
2024-02-29 23:29:55 +08:00
|
|
|
springBoot {
|
|
|
|
mainClass.set("icu.samnyan.aqua.AquaServerApplicationKt")
|
|
|
|
}
|
|
|
|
|
2023-01-08 00:27:56 +08:00
|
|
|
val buildTime: String by extra(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss z").withZone(ZoneId.of("UTC")).format(Instant.now()))
|
|
|
|
|
|
|
|
tasks.processResources {
|
|
|
|
filesMatching("**/application.properties") {
|
|
|
|
expand(project.properties)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
|
2024-03-03 12:59:03 +08:00
|
|
|
tasks.withType<JavaCompile> {
|
2023-01-08 00:27:56 +08:00
|
|
|
options.encoding = "UTF-8"
|
|
|
|
}
|
|
|
|
|
2024-03-03 12:59:03 +08:00
|
|
|
tasks.withType<Javadoc> {
|
2023-01-08 00:27:56 +08:00
|
|
|
options.encoding = "UTF-8"
|
|
|
|
}
|
2024-03-03 12:59:03 +08:00
|
|
|
|
|
|
|
tasks.getByName<Jar>("jar") {
|
|
|
|
enabled = false
|
|
|
|
}
|