-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
90 lines (78 loc) · 2.52 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
plugins {
id 'java'
id 'application'
id 'com.diffplug.spotless' version '6.22.0'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}
group = 'com.javadiscord.bot'
version = project.version
application {
mainClass = 'com.javadiscord.bot.Main'
}
shadowJar {
archiveBaseName.set('Java-Discord-Bot')
archiveClassifier.set('')
archiveVersion.set('')
}
spotless {
java {
importOrder()
googleJavaFormat()
.aosp()
.reflowLongStrings()
.formatJavadoc(true)
.reorderImports(true)
.groupArtifact('com.google.googlejavaformat:google-java-format')
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.github.docker-java:docker-java:3.3.6'
implementation 'com.theokanning.openai-gpt3-java:service:0.18.2'
implementation 'com.rometools:rome:2.1.0'
implementation 'net.dv8tion:JDA:5.0.0-beta.18'
implementation 'com.fasterxml.jackson.core:jackson-core:2.16.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.16.0'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.16.0'
implementation 'org.apache.logging.log4j:log4j-api:2.22.1'
implementation 'org.apache.logging.log4j:log4j-core:2.22.1'
// annotationProcessor 'org.apache.logging.log4j:log4j-core:2.22.1'
}
tasks.register('stage') {
dependsOn build
}
test {
useJUnitPlatform()
}
tasks.register('bumpPatchVersion') {
doLast {
def versionParts = project.version.split("\\.")
def newVersion = "${versionParts[0]}.${versionParts[1]}.${versionParts[2] as Integer + 1}"
project.version = newVersion
file('gradle.properties').text = "version=$newVersion"
println "Version bumped to: $newVersion"
}
}
tasks.register('bumpMinorVersion') {
doLast {
def versionParts = project.version.split("\\.")
def newVersion = "${versionParts[0]}.${versionParts[1] as Integer + 1}.0"
project.version = newVersion
file('gradle.properties').text = "version=$newVersion"
println "Version bumped to: $newVersion"
}
}
tasks.register('bumpMajorVersion') {
doLast {
def versionParts = project.version.split("\\.")
def newVersion = "${versionParts[0] as Integer + 1}.0.0"
project.version = newVersion
file('gradle.properties').text = "version=$newVersion"
println "Version bumped to: $newVersion"
}
}