This repository has been archived by the owner on Aug 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
65 lines (51 loc) · 1.54 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
import java.text.SimpleDateFormat
plugins {
id 'java'
id 'application'
id 'com.github.johnrengelman.shadow' version '6.0.0'
}
mainClassName = 'xyz.xenus.bot.Main'
group 'xyz.xenus'
version '20w47a-SNAPSHOT'
// Disable all distributions
distTar.enabled(false)
distZip.enabled(false)
shadowDistTar.enabled(false)
shadowDistZip.enabled(false)
// Disable gradle jar
jar.enabled(false)
// Disable scripts generation
startScripts.enabled(false)
startShadowScripts.enabled(false)
repositories {
mavenCentral()
jcenter()
}
task versionFile() {
new File("${project.getProjectDir()}/build/libs", "version.txt").text =
"Version: ${project.getVersion()}\n" +
"Buildtime: ${new SimpleDateFormat("dd-MM-yyyy HH:mm:ss").format(new Date())}\n" +
"Application-name: Xenus"
}
task zipFile(type: Zip) {
from("build/libs")
include("*")
archiveName("Xenus-${project.getVersion()}.zip")
destinationDir(new File("${project.getProjectDir()}/build/distributions"))
}
shadowJar {
archiveFileName = "Xenus.jar"
}
build {
finalizedBy(versionFile, zipFile)
}
dependencies {
testImplementation group: 'junit', name: 'junit',
version: '4.12'
implementation 'io.github.cdimascio:java-dotenv:5.2.1'
implementation 'org.yaml:snakeyaml:1.26'
implementation 'net.dv8tion:JDA:4.2.0_214'
implementation 'org.mongodb:mongodb-driver-sync:4.1.0'
implementation 'ch.qos.logback:logback-classic:1.2.3'
implementation 'com.googlecode.json-simple:json-simple:1.1.1'
}