mirror of
https://github.com/DreamExposure/DisCal-Discord-Bot.git
synced 2026-05-07 09:49:42 -05:00
b1c12b2788
Fully convert to using Gradle instead of Maven for dependency management and building. This change also includes using Jib again as it works properly for multi-module projects with Gradle. Some files have been relocate to places that semantically make more sense and work will with a proper build system. Added GitProperties for handling certain variables that need to be set at build time (for example the version name seen by users) as these were previously set through Maven hackery.
55 lines
1.5 KiB
Kotlin
55 lines
1.5 KiB
Kotlin
plugins {
|
|
kotlin("plugin.spring")
|
|
id("org.springframework.boot")
|
|
id("org.jetbrains.kotlin.plugin.allopen")
|
|
id("com.google.cloud.tools.jib")
|
|
}
|
|
|
|
val springVersion: String by ext
|
|
val springSecurityVersion: String by ext
|
|
val springSessionVersion: String by ext
|
|
val springR2Version: String by ext
|
|
|
|
dependencies {
|
|
api(project(":core"))
|
|
|
|
//Database stuff
|
|
implementation("org.flywaydb:flyway-core:7.11.2")
|
|
implementation("mysql:mysql-connector-java:8.0.25")
|
|
|
|
//Top gg lib
|
|
implementation("org.discordbots:DBL-Java-Library:2.0.1")
|
|
|
|
//Spring libs
|
|
implementation("org.springframework.session:spring-session-data-redis:$springSessionVersion")
|
|
implementation("org.springframework.security:spring-security-core:$springSecurityVersion")
|
|
implementation("org.springframework.security:spring-security-web:$springSecurityVersion")
|
|
implementation("org.springframework:spring-r2dbc:$springR2Version")
|
|
|
|
//jackson for kotlin
|
|
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.12.4")
|
|
}
|
|
|
|
kotlin {
|
|
sourceSets {
|
|
all {
|
|
kotlin.srcDir("server/src/main/kotlin")
|
|
}
|
|
}
|
|
}
|
|
|
|
jib {
|
|
var imageVersion = version.toString()
|
|
if (imageVersion.contains("SNAPSHOT")) imageVersion = "latest"
|
|
|
|
to.image = "rg.nl-ams.scw.cloud/dreamexposure/discal-server:$imageVersion"
|
|
from.image = "adoptopenjdk/openjdk16:alpine-jre"
|
|
container.creationTime = "USE_CURRENT_TIMESTAMP"
|
|
}
|
|
|
|
tasks {
|
|
bootJar {
|
|
archiveFileName.set("DisCal-Server.jar")
|
|
}
|
|
}
|