-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
105 lines (84 loc) · 2.22 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
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* User Manual available at https://docs.gradle.org/5.2.1/userguide/tutorial_java_projects.html
*/
plugins {
id 'java-library'
//For jitback
id 'maven'
id 'maven-publish'
//Test Coverage
id 'jacoco'
// Code style
id 'checkstyle'
}
group = 'com.github.ubikampus'
version = '0.2.0'
jacoco {
toolVersion = "0.8.3"
reportsDir = file("$buildDir/JacocoReports")
}
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
api 'org.apache.commons:commons-math3:3.6.1'
implementation 'com.google.guava:guava:27.0.1-jre'
implementation 'com.github.ubikampus:ubimqttjava:v2.0.6'
implementation 'com.lemmingapex.trilateration:trilateration:1.0.2'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.1.0'
}
test {
testLogging.showStandardStreams = true
systemProperties System.getProperties()
}
sourceCompatibility = 1.11
targetCompatibility = 1.11
jacocoTestReport {
reports {
xml.enabled true
html.enabled true
}
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
'**/*UbiMqttProvider.*', '**/*UbiMqttProvider$*.*'
])
})
}
}
jar {
manifest {
attributes('Implementation-Title': project.name,
'Implementation-Version': project.version)
}
}
task stage {
dependsOn build
}
task copyToLib(type: Copy) {
into "$buildDir/libs"
from(configurations.compile)
}
stage.dependsOn(copyToLib)
check.dependsOn jacocoTestReport
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}