-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
98 lines (84 loc) · 4.22 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
95
96
97
98
import java.nio.file.Files
plugins {
id 'java'
}
group 'uk.gemwire'
version project.bot_version
tasks.register('run', JavaExec).configure {
classpath(sourceSets.main.runtimeClasspath)
mainClass.set('uk.gemwire.camelot.BotMain')
workingDir = project.file('run')
doFirst {
if (!workingDir.exists()) {
Files.createDirectories(workingDir.toPath())
}
}
}
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
repositories {
mavenCentral()
maven {
name 'm2-dv8tion'
url 'https://m2.dv8tion.net/releases'
}
maven {
name 'jda-chewtils'
url 'https://m2.chew.pro/releases'
}
maven {
name 'jitpack'
url 'https://jitpack.io'
}
}
compileJava {
options.encoding = 'UTF-8'
}
dependencies {
implementation group: 'com.github.matyrobbrt', name: 'JDA-Chewtils', version: "${project.jda_chewtils_version}"
implementation group: 'net.dv8tion', name: 'JDA', version: "${project.jda_version}"
implementation group: 'com.google.guava', name: 'guava', version: "${project.guava_version}"
implementation group: 'com.google.code.gson', name: 'gson', version: "${project.gson_version}"
implementation group: 'ch.qos.logback', name: 'logback-classic', version: "${project.logback_version}"
implementation group: 'org.flywaydb', name: 'flyway-core', version: project.flyway_version
implementation group: 'org.jdbi', name: 'jdbi3-core', version: project.jdbi_version
implementation group: 'org.jdbi', name: 'jdbi3-sqlobject', version: project.jdbi_version
implementation group: 'org.xerial', name: 'sqlite-jdbc', version: project.sqlite_version
// YML parsing and generation
implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: project.jackson_version
// GitHub API interaction library
implementation group: 'org.kohsuke', name: 'github-api', version: project.ghapi_version
// GitHub api JWT generation
implementation group: 'io.jsonwebtoken', name: 'jjwt-api', version: project.jjwt_version
implementation group: 'io.jsonwebtoken', name: 'jjwt-impl', version: project.jjwt_version
implementation group: 'io.jsonwebtoken', name: 'jjwt-jackson', version: project.jjwt_version
// Converting private keys for GitHub auth
implementation group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: project.bcpkix_version
// JDA runtime dependency that we use for custom snowflake views
implementation group: 'net.sf.trove4j', name: 'trove4j', version: project.trove4j_version
implementation group: 'club.minnced', name: 'discord-webhooks', version: project.discord_webhooks_version
implementation group: 'net.sf.jopt-simple', name: 'jopt-simple', version: project.jopt_version // Used by tricks
implementation group: 'org.graalvm.js', name: 'js', version: project.graal_version
implementation group: 'org.graalvm.js', name: 'js-scriptengine', version: project.graal_version
implementation group: 'args4j', name: 'args4j', version: project.arg4j_version
implementation group: 'com.google.re2j', name: 're2j', version: project.re2j_version
implementation group: 'it.unimi.dsi', name: 'fastutil', version: project.fastutil_version
}
jar {
manifest {
mainAttributes(
'Maven-Artifact': "${project.group}:${archivesBaseName}:${project.bot_version}",
'Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
'Specification-Title': archivesBaseName,
'Specification-Vendor': 'Gemwire',
'Specification-Version': '1',
'Implementation-Title': archivesBaseName,
'Implementation-Version': "${project.bot_version}",
'Implementation-Vendor': 'Gemwire',
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
'Built-On-Java': "${System.getProperty('java.vm.version')} (${System.getProperty('java.vm.vendor')})",
'Built-On': "${project.jda_version}-${project.jda_chewtils_version}",
'Class-Path': configurations.compileClasspath.collect { it.getName() }.join(' '),
'Main-Class': 'uk.gemwire.camelot.BotMain'
)
}
}