-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
127 lines (108 loc) · 4.49 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath group: 'org.junit.platform', name: 'junit-platform-gradle-plugin', version: '1.1.0-M1'
}
}
repositories {
mavenCentral()
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'jacoco'
apply plugin: 'org.junit.platform.gradle.plugin'
project.ext {
log4jVersion = "2.9.1"
luceneVersion = "6.6.0"
jacksonVersion = "2.9.3"
guavaVersion = "23.2-jre"
jodaTimeVersion = "2.9.9"
commons4Version = "4.1"
commonsCliVersion = "1.4"
bitlyVersion = "2.0.0"
pircBotVersion = "1.5.0"
junitPlatformVersion = "1.1.0-M1"
junitJupiterVersion = "5.1.0-M1"
mockitoVersion = "2.11.0"
}
group 'com.domhauton.wanbot'
sourceCompatibility = 1.8
compileTestJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
options.compilerArgs += '-parameters'
}
junitPlatform {
platformVersion junitPlatformVersion
filters {
engines {
include 'junit-jupiter'
}
tags {
// exclude 'dockerbuildskip' // DOCKER-BUILD-ONLY
}
}
}
dependencies {
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: log4jVersion
// https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml
compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: jacksonVersion
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: jacksonVersion
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: jacksonVersion
// https://mvnrepository.com/artifact/com.google.guava/guava
compile group: 'com.google.guava', name: 'guava', version: guavaVersion
// https://mvnrepository.com/artifact/joda-time/joda-time
compile group: 'joda-time', name: 'joda-time', version: jodaTimeVersion
// https://mvnrepository.com/artifact/org.apache.commons/commons-collections4
compile group: 'org.apache.commons', name: 'commons-collections4', version: commons4Version
// https://mvnrepository.com/artifact/com.rosaloves/bitlyj
compile group: 'com.rosaloves', name: 'bitlyj', version: bitlyVersion
// https://mvnrepository.com/artifact/pircbot/pircbot
compile group: 'pircbot', name: 'pircbot', version: pircBotVersion
// https://mvnrepository.com/artifact/commons-cli/commons-cli
compile group: 'commons-cli', name: 'commons-cli', version: commonsCliVersion
// https://mvnrepository.com/artifact/org.apache.lucene/lucene-core
compile group: 'org.apache.lucene', name: 'lucene-core', version: luceneVersion
// https://mvnrepository.com/artifact/org.apache.lucene/lucene-facet
compile group: 'org.apache.lucene', name: 'lucene-facet', version: luceneVersion
}
dependencies {
// https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api
testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: junitJupiterVersion
// https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine
testRuntime group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: junitJupiterVersion
// https://mvnrepository.com/artifact/org.mockito/mockito-core
testCompile group: 'org.mockito', name: 'mockito-core', version: mockitoVersion
}
// Copy all libs to build directory for docker image generation
task copyToLib(type: Copy) {
into "$buildDir/output/libs"
from configurations.runtime
}
build.dependsOn(copyToLib)
// Configure jacoco to correctly parse junit jupiter test results
afterEvaluate {
def junitPlatformTestTask = (JavaExec) project.tasks.getByName('junitPlatformTest')
jacoco {
applyTo(junitPlatformTestTask)
}
project.task(type: JacocoReport, "jacocoJupTestReport") {
executionData(junitPlatformTestTask)
sourceSets(sourceSets.main)
sourceDirectories = files(sourceSets.main.allSource.srcDirs)
classDirectories = files(sourceSets.main.output)
reports {
xml.setEnabled(true)
xml.destination file("${buildDir}/jacoco/report.xml")
html.setEnabled(true)
html.destination file("${buildDir}/jacoco/html")
}
}
check.dependsOn jacocoJupTestReport
}