-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
75 lines (59 loc) · 1.83 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
plugins {
id 'java'
id 'application'
id 'idea'
}
repositories {
mavenCentral()
}
group 'com.github.silvanheller.mensabot'
version '1.2.0'
def mainClassName = 'com.github.silvanheller.mensabot.main.Main'
compileJava.options.encoding = 'UTF-8'
sourceCompatibility = JavaVersion.VERSION_11
dependencies {
////// LOGGING
implementation 'org.apache.logging.log4j:log4j-api:2.+'
implementation 'org.apache.logging.log4j:log4j-core:2.+'
// JSON
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.9'
// API Requests
implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '4.9.3'
implementation group: 'com.microsoft.bing', name: 'bing-imagesearch', version: '1.0.0'
////// TELEGRAM
implementation group: 'org.telegram', name: 'telegrambots', version: '5.+'
// CONFIG
implementation group: 'com.typesafe', name: 'config', version: '1.+'
// SCRAPING
implementation group: 'org.jsoup', name: 'jsoup', version: '1.+'
}
/*
The following block adds both compile and runtime dependencies to the jar
*/
jar {
manifest {
attributes(
"Manifest-Version": "1.0",
'Main-Class': mainClassName,
'multi-release': true
)
}
from {
configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) }
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
archiveBaseName.set("mensa-bot")
exclude("META-INF/*.RSA", "META-INF/*.DSA", "META-INF/*.SF")
}
rootProject.tasks.named("jar") {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
//IDEA if gradle is buggy
idea {
module {
downloadJavadoc = true
//Exclude downloaded stuff
excludeDirs += file('storage')
excludeDirs += file('logs')
}
}