-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
72 lines (58 loc) · 1.57 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
plugins {
id 'application'
id 'com.github.johnrengelman.shadow' version '2.0.2'
}
apply plugin: 'java'
apply plugin: 'idea'
version '0.2.1'
group 'com.avairebot'
description = 'AvaIre Watchdog'
mainClassName = 'com.avairebot.watchdog.Main'
sourceCompatibility = 1.8
targetCompatibility = 1.8
ext {
moduleName = 'Watchdog'
}
shadowJar {
archiveName = "Watchdog.jar"
doLast {
copy {
from 'build/libs/Watchdog.jar'
into '.'
}
}
}
tasks.withType(JavaCompile) {
dependsOn 'clean'
options.encoding = 'UTF-8'
options.compilerArgs << "-Xlint:-unchecked"
}
task fatJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'AvaIre: Watchdog',
'Implementation-Version': version,
'Main-Class': 'com.avairebot.watchdog.Main'
}
baseName = project.name
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
compile group: 'com.github.avaire', name: 'Shared', version: 'e0ec78fd82'
compile group: 'commons-cli', name: 'commons-cli', version: '1.3.1'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
import org.apache.tools.ant.filters.ReplaceTokens
processResources {
filesMatching("**/app.properties") {
filter ReplaceTokens, tokens: [
"project.version" : project.version,
"project.groupId" : project.group,
"project.artifactId": project.ext.moduleName
]
}
}