forked from Novalaina/decks-of-keyforge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
114 lines (94 loc) · 3.93 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
102
103
104
105
106
107
108
109
110
111
112
113
114
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.springframework.boot.gradle.tasks.bundling.BootJar
plugins {
val kotlinVersion = "1.9.10"
kotlin("jvm") version kotlinVersion
kotlin("plugin.spring") version kotlinVersion
kotlin("plugin.jpa") version kotlinVersion
kotlin("kapt") version kotlinVersion
id("org.springframework.boot") version "3.2.2"
id("io.spring.dependency-management") version "1.1.3"
}
group = "coraythan"
version = "599"
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf(
"-Xjsr305=strict",
"-opt-in=kotlin.ExperimentalStdlibApi"
)
jvmTarget = "17"
}
}
tasks.getByName<BootJar>("bootJar") {
from(".ebextensions") {
into(".ebextensions")
}
}
tasks.register<Copy>("dockerCopyJar") {
from(File("build/libs/keyswap-$version.jar"))
rename("keyswap-$version.jar", "keyswap.jar")
into(File("./docker"))
include("*.jar")
}
springBoot {
mainClass.set("coraythan.keyswap.KeyswapApplicationKt")
}
repositories {
mavenCentral()
}
tasks.register<JavaExec>("genTs") {
mainClass.set("coraythan.keyswap.generatets.TsGenerator")
classpath = sourceSets["main"].runtimeClasspath
}
tasks.register("genSrc") {
dependsOn("genTs")
doLast {
File("$projectDir/src/main/resources", "application-generated.yml").writeText("api-version: $version")
File("$projectDir/ui/src/config", "ClientVersion.ts").writeText("export const clientVersion = $version")
File("$projectDir", "version.txt").writeText("$version")
val dockerrunContents = File("$projectDir/docker", "Dockerrun.aws.json.template")
.readText()
.replace("\$version", "$version")
File("$projectDir/docker", "Dockerrun.aws.json")
.writeText(dockerrunContents)
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
dependencies {
val queryDslVersion = "5.0.0"
val jjwtVersion = "0.12.2"
val shedlockVersion = "5.8.0"
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")
implementation("org.springframework.boot:spring-boot-starter-mail")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:0.9.1")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml")
implementation("org.flywaydb:flyway-core")
implementation("net.javacrumbs.shedlock:shedlock-spring:$shedlockVersion")
implementation("net.javacrumbs.shedlock:shedlock-provider-jdbc-template:$shedlockVersion")
implementation("org.apache.commons:commons-lang3:3.13.0")
implementation("org.logback-extensions:logback-ext-loggly:0.1.5")
implementation("com.patreon:patreon:0.4.2")
implementation("com.amazonaws:aws-java-sdk-s3:1.12.565")
implementation("io.jsonwebtoken:jjwt-api:$jjwtVersion")
runtimeOnly("io.jsonwebtoken:jjwt-impl:$jjwtVersion")
runtimeOnly("io.jsonwebtoken:jjwt-jackson:$jjwtVersion")
implementation("io.hypersistence:hypersistence-utils-hibernate-62:3.7.1")
implementation("com.querydsl:querydsl-core:$queryDslVersion")
implementation("com.querydsl:querydsl-jpa:$queryDslVersion:jakarta")
kapt("com.querydsl:querydsl-apt:$queryDslVersion:jakarta")
runtimeOnly("org.postgresql:postgresql")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.security:spring-security-test")
testImplementation("org.junit.vintage:junit-vintage-engine") {
exclude(group = "org.hamcrest", module = "hamecrest-core")
}
}