-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
94 lines (77 loc) · 2.49 KB
/
build.gradle
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
import java.util.concurrent.TimeUnit
plugins {
id 'java'
id 'application'
alias(libs.plugins.buildConfig)
alias(libs.plugins.shadow)
}
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
implementation(libs.jda)
implementation(libs.bundles.jdbc.all)
implementation(libs.json)
implementation(libs.slf4j.api)
implementation(libs.slf4j.simple)
implementation(libs.avaje.jsonb)
implementation(libs.avaje.inject)
implementation(libs.avaje.config)
implementation(libs.ioutils)
implementation(libs.wisp)
implementation(libs.doma.core)
implementation(libs.bucket4j)
implementation(libs.dropwizard.metrics)
testImplementation(libs.junit.jupiter.engine)
testImplementation(libs.junit.jupiter.params)
testImplementation(libs.mockito)
compileOnly(libs.lombok)
compileOnly(libs.jetbrains.annotations)
compileOnly(libs.jakarta.inject)
testCompileOnly(libs.lombok)
annotationProcessor(libs.lombok)
annotationProcessor(libs.doma.processor)
annotationProcessor(libs.avaje.jsonb.generator)
annotationProcessor(libs.avaje.inject.generator)
}
group = 'org.mintdaniel42.starediscordbot'
version = '2.4'
application.mainClass = "${project.group}.Bot"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(23)
}
}
tasks.test {
useJUnitPlatform()
jvmArgs(['--enable-preview'])
}
tasks.withType(JavaCompile).each {
it.options.compilerArgs += ['--enable-preview']
}
tasks.compileJava {
options.compilerArgs += ['-Adoma.domain.converters=org.mintdaniel42.starediscordbot.data.domain.DomainConvertersProvider']
}
tasks.jar {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
manifest.attributes("Main-Class": application.mainClass)
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
tasks.shadowJar {
minimize()
}
buildConfig {
packageName("${project.group}.build")
forClass(className = "BuildConfig") {
buildConfigField("java.util.Locale", "locale", "Locale.GERMANY")
buildConfigField(long, "cleaningInterval", TimeUnit.MINUTES.toMillis(5))
buildConfigField(long, "maxRequestAge", TimeUnit.DAYS.toMillis(2))
buildConfigField(long, "maxUsernameAge", TimeUnit.DAYS.toMillis(5))
buildConfigField(int, "entriesPerPage", 10)
buildConfigField(boolean, "autoFetch", true)
buildConfigField(boolean, "production", !(System.getenv("DEV") == "1"))
}
}