This repository has been archived by the owner on Mar 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
72 lines (62 loc) · 2.1 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
buildscript {
repositories { jcenter() }
dependencies {
classpath 'se.transmode.gradle:gradle-docker:1.2'
}
}
plugins {
id 'java'
id 'application'
id 'com.github.johnrengelman.shadow' version '2.0.1'
id 'com.sedmelluq.jdaction' version '1.0.2'
id "de.undercouch.download" version "3.3.0"
id 'org.hidetake.swagger.generator' version '2.9.0'
}
def jdaVersion = '3.5.1_339'
mainClassName = 'com.discordservers.Bot'
group 'discordservers'
version '0.1.0'
sourceCompatibility = 1.8
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'docker'
repositories {
mavenCentral()
jcenter()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile 'com.squareup.okhttp3:okhttp:3.9.1'
compile 'com.jagrosh:jda-utilities:2.1'
compile group: 'com.mashape.unirest', name: 'unirest-java', version: '1.3.1'
compile "net.dv8tion:JDA:$jdaVersion"
compile 'com.datadoghq:java-dogstatsd-client:2.5'
compile group: 'com.squareup.okhttp', name: 'okhttp', version: '2.4.0'
compile group: 'com.google.code.gson', name: 'gson', version: '2.3.1'
compile group: 'com.squareup.okhttp', name: 'logging-interceptor', version: '2.7.5'
compile 'io.swagger:swagger-annotations:1.5.10'
swaggerCodegen 'io.swagger:swagger-codegen-cli:2.2.3'
}
compileJava.options.encoding = 'UTF-8'
docker {
applicationName = "bot"
baseImage "openjdk:8-jre-alpine"
useApi true
registry "$System.env.CI_REGISTRY_USER:$System.env.CI_REGISTRY_PASSWORD@$System.env.CI_REGISTRY"
}
swaggerSources {
discordservers {
download {
src 'https://api.discordservers.com/docs.json'
dest buildDir
}
inputFile = file(buildDir.toString() + "/docs.json")
code {
language = 'java'
configFile = file('config.json')
}
}
}
compileJava.dependsOn swaggerSources.discordservers.code
sourceSets.main.java.srcDir "${swaggerSources.discordservers.code.outputDir}/src/main/java"
sourceSets.main.resources.srcDir "${swaggerSources.discordservers.code.outputDir}/src/main/resources"