-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
44 lines (39 loc) · 1015 Bytes
/
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
// coding in java
apply plugin: 'java'
// using jacoco for code coverage
apply plugin: 'jacoco'
// using eclipse
apply plugin: 'eclipse'
// create custom Jar with all dependencies inside
task fatJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'JEncoder', 'Main-Class': 'org.niotics.jencoder.JEncoder'
}
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
// create custom Jar without any dependency inside (almost the same as assemble)
task smallJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'JEncoder', 'Main-Class': 'org.niotics.jencoder.JEncoder'
}
with jar
}
// source of dependencies
repositories {
// central maven repository
mavenCentral()
}
// actual dependencies
dependencies {
// Junit for testing
testCompile 'junit:junit:4.12'
}
// xml report for codecov.io
jacocoTestReport {
reports {
xml.enabled true
html.enabled false
}
}