-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
98 lines (87 loc) · 2.24 KB
/
build.gradle.kts
File metadata and controls
98 lines (87 loc) · 2.24 KB
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
import org.jetbrains.gradle.ext.Application
import org.jetbrains.gradle.ext.runConfigurations
import org.jetbrains.gradle.ext.settings
plugins {
application
java
idea
`java-library-distribution`
alias(libs.plugins.idea.ext) apply true
}
group = "net.modgarden"
version = project.properties["version"].toString()
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
withJavadocJar()
}
repositories {
mavenCentral()
maven("https://repo.glaremasters.me/repository/public/") {
name = "GlareMasters"
}
}
dependencies {
implementation(libs.dfu)
implementation(libs.javalin)
implementation(libs.logback)
implementation(libs.sqlite)
implementation(libs.snowflakeid)
implementation(libs.dotenv)
implementation(libs.jwt.api)
implementation(libs.jwt.impl)
implementation(libs.jwt.gson)
implementation(libs.base62)
implementation(libs.jetbrains.annotations)
}
tasks {
val expandProps = mapOf(
"version" to version
)
val processResourcesTasks = listOf("processResources", "processTestResources")
assemble.configure {
dependsOn(processResourcesTasks)
}
distZip.configure {
archiveFileName.set("mod-garden-backend.zip")
}
jar.configure {
manifest {
attributes["Main-Class"] = "net.modgarden.backend.ModGardenBackend"
}
archiveFileName.set("mod-garden-backend.jar")
}
withType<ProcessResources>().matching { processResourcesTasks.contains(it.name) }.configureEach {
inputs.properties(expandProps)
filesMatching("landing.json") {
expand(expandProps)
}
}
withType<Zip>().configureEach {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
}
distributions {
main {
contents {
into("../mod-garden-backend")
}
}
}
application {
mainClass = "net.modgarden.backend.ModGardenBackend"
}
idea {
project {
settings.runConfigurations {
create("Run", Application::class.java) {
workingDirectory = "${rootProject.projectDir}/run"
mainClass = "net.modgarden.backend.ModGardenBackend"
moduleName = project.idea.module.name + ".main"
includeProvidedDependencies = true
envs = mapOf(
"env" to "development"
)
}
}
}
}