-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
56 lines (44 loc) · 1.16 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
group = "com.github.kratorius.jelf"
def javaVersion = JavaVersion.VERSION_1_8
task wrapper(type: Wrapper) {
gradleVersion = '2.3'
}
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'application'
compileJava {
options.encoding = 'UTF-8'
options.compilerArgs << '-XDignore.symbol.file'
options.fork = true
options.forkOptions.executable = 'javac'
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
}
repositories {
mavenCentral()
mavenLocal()
}
sourceSets {
perf
}
dependencies {
compile 'com.google.code.findbugs:jsr305:3.0.0'
testCompile 'junit:junit:4.11'
perfCompile project
perfCompile 'org.openjdk.jmh:jmh-core:1.8'
perfCompile 'org.openjdk.jmh:jmh-generator-annprocess:1.8'
}
idea {
module {
scopes.PROVIDED.plus += [ configurations.perfCompile ]
}
}
task perf(type: JavaExec, dependsOn: [classes, perfClasses]) {
description 'Execute the benchmark timing of this project'
maxHeapSize '2g'
main 'org.openjdk.jmh.Main'
if (project.hasProperty('args')) {
args project.args.split('\\s+')
}
classpath = sourceSets.perf.runtimeClasspath
}