This repository has been archived by the owner on Aug 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
78 lines (67 loc) · 2.16 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
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '6.1.0'
}
group 'com.disbots.spark'
version '1.3.0'
def junitVersion = "5.7.0"
def javacordVersion = "3.3.1"
def log4jVersion = "2.14.1"
def slf4jVersion = "1.7.30"
def envVersion = "2.2.0"
def mongodbDriverVersion = "4.1.2"
def jacksonVersion = "2.12.3"
def anotationVersion = "20.1.0"
def classPath = "/libs/Spark-0.1.3.0-all.jar"
def mainClassName = "com.disbots.spark.core.Main"
repositories {
mavenCentral()
}
// dependencies for main project
dependencies {
//misc
implementation "org.jetbrains:annotations:$anotationVersion"
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
//javacord/log4j
implementation "org.javacord:javacord:$javacordVersion"
runtimeOnly "org.apache.logging.log4j:log4j-core:$log4jVersion"
//dotenv (for loading .env files) and mongo driver
compile "io.github.cdimascio:dotenv-java:$envVersion"
compile "org.mongodb:mongodb-driver-sync:$mongodbDriverVersion"
//slf4j for log4j for mongodb error logging
implementation "org.slf4j:slf4j-log4j12:$slf4jVersion"
//jackson for JSON parsing
implementation "com.fasterxml.jackson.core:jackson-core:$jacksonVersion"
implementation "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
//sdcf4j
compile project(":sdcf4j-core")
compile project(":sdcf4j-javacord")
}
subprojects {
// instructions for each subproject.
apply plugin: "java"
repositories {
mavenCentral()
}
}
// dependencies for sdcf4j-javacord
project(":sdcf4j-javacord"){
dependencies {
compile project(":sdcf4j-core")
implementation "org.javacord:javacord-api:$javacordVersion"
implementation "org.javacord:javacord-core:$javacordVersion"
implementation "org.apache.logging.log4j:log4j-api:$log4jVersion"
}
}
task stage(dependsOn: ['build','shadowJar', 'clean', 'test'])
build.mustRunAfter clean
build.mustRunAfter test
jar {
manifest{
attributes 'Class-Path': classPath, 'Main-Class': mainClassName
}
}
test {
useJUnitPlatform()
}