-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
52 lines (40 loc) · 1.19 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
apply plugin: 'maven'
apply plugin: 'java'
version = '0.1-SNAPSHOT'
def GROUP_ID = 'net.bvargo.airplay'
def ARTIFACT = 'airplay'
repositories {
mavenCentral()
}
dependencies {
compile group:"javax.jmdns", name: "jmdns", version: "3.4.1"
}
// compiler options
compileJava.options.compilerArgs = [ '-Xlint:unchecked', '-Xlint:deprecation' ]
task uberjar(type: Jar, dependsOn: build) {
// base name of the jar file
baseName = ARTIFACT + "-all"
// main class for running the jar
manifest { attributes "Main-Class": "net.bvargo.airplay.Main" }
// from all exploded jar files
configurations.runtime.each { file ->
if(file.isFile() && file.name.endsWith(".jar")) {
from zipTree(file)
}
}
// add all non-jar runtime dependencies
configurations.runtime.each { file ->
if(file.isDirectory()) {
from file
}
}
// add the output directory
from new File("$buildDir/output")
// include the source files
configurations.archives.artifacts*.file.each { file ->
from zipTree(file)
}
}
test {
jvmArgs '-agentlib:hprof=cpu=samples,interval=2,depth=30,thread=y,file=build/profile.hprof'
}