-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
61 lines (43 loc) · 1.25 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
import java.nio.file.Paths
plugins {
id 'net.saliman.cobertura' version '2.3.1'
id 'com.github.kt3k.coveralls' version '2.8.1'
}
cobertura.coverageFormats = ['html', 'xml']
group 'JVMMonitorServer'
version '1.0'
apply plugin: 'java'
apply plugin: 'idea'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
def separator = File.separator
def javaHome = System.getProperty('java.home')
def path = Paths.get(javaHome).getParent().toAbsolutePath().toString()
def toolsPath = path + separator + 'lib' + separator + 'tools.jar'
dependencies {
compile project(':agent')
compile project(':core')
compile 'com.github.rodbate:httpserver:1.0.3'
compile files(toolsPath)
testCompile group: 'junit', name: 'junit', version: '4.11'
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
task fatJar(type: Jar) {
manifest {
attributes( "Main-Class" : "com.rodbate.server.Launcher")
}
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } with jar
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
tasks.withType(Javadoc) {
options.encoding = 'UTF-8'
}