-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
82 lines (73 loc) · 2.11 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
buildscript {
repositories {
jcenter()
mavenCentral()
maven {
name 'm2-dv8tion'
url 'https://m2.dv8tion.net/releases'
}
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:6.1.0'
}
}
plugins {
id 'java'
id 'application'
id 'com.github.johnrengelman.shadow' version "6.1.0"
id 'com.palantir.docker' version '0.25.0'
id 'com.palantir.docker-run' version '0.25.0'
id "co.uzzu.dotenv.gradle" version "1.1.0"
}
group 'io.fluentcoding'
version '1.0'
dependencies {
compile 'org.glassfish.tyrus.bundles:tyrus-standalone-client:1.9'
compile 'javax.websocket:javax.websocket-api:1.1'
compile 'com.github.vladimir-bukhtoyarov:bucket4j-core:7.6.0'
compile 'org.slf4j:slf4j-simple:2.0.0'
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
implementation ('net.dv8tion:JDA:4.3.0_277') {
exclude module: 'opus-java'
}
implementation 'org.mongodb:mongo-java-driver:3.12.11'
implementation 'org.apache.httpcomponents:httpclient:4.5.13'
implementation group: 'org.json', name: 'json', version: '20090211'
implementation 'io.github.cdimascio:dotenv-java:2.2.4'
}
repositories {
jcenter()
maven {
name 'm2-dv8tion'
url 'https://m2.dv8tion.net/releases'
}
mavenCentral()
}
ext {
javaMainClass = "io.fluentcoding.codemanbot.Application"
execmode = env.fetch("CODEMAN_EXEC_MODE", "dev")
}
application {
mainClassName = javaMainClass
}
jar {
manifest {
attributes 'Main-Class': javaMainClass
}
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
}
docker {
name "${project.name}${execmode}:${project.version}"
files "$buildDir/libs/${project.name}-${project.version}-all.jar", "$rootDir/.env"
buildArgs([JAR_FILE: "${project.name}-${project.version}-all.jar"])
}
dockerRun {
name "${project.name}${execmode}"
image "${project.name}${execmode}:${project.version}"
clean true
daemonize true
arguments "--net=host"
}