-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
86 lines (73 loc) · 2.85 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
/*
* Computer and algorithm interaction simulation software (CAISS).
* Copyright (C) 2016 Sergey Pomelov.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
plugins {
id "java"
id "idea"
// jmh staff next
id "com.github.johnrengelman.shadow" version "1.2.3"
id "me.champeau.gradle.jmh" version "0.3.0"
id "net.ltgt.apt" version "0.6"
}
repositories {
jcenter()
mavenCentral()
}
sourceCompatibility = JavaVersion.VERSION_1_8
//noinspection GroovyUnusedAssignment - false, while it works don't touch it
targetCompatibility = sourceCompatibility
tasks.withType(AbstractCompile)*.options*.encoding = "UTF-8"
jmh.jmhVersion = "1.12"
// the main class where other test classes should be registered.
tasks.jmh.main = "benchmarks.control.JMHBenchmarksRunner"
//noinspection GroovyAssignabilityCheck - false, while it works don't touch it
sourceSets {
main {
java {
srcDir "src/main/java"
}
resources {
srcDir "src/main/resources"
}
}
}
jmhJar {
//noinspection GroovyAssignabilityCheck - false, while it works don"t touch it
manifest.attributes "Main-Class": tasks.jmh.main
append "META-INF/BenchmarkList"
append "META-INF/CompilerHints"
}
task fatJar(type: Jar) {
manifest {
//noinspection GroovyAssignabilityCheck - false, while it works don't touch it
attributes "Main-Class": "benchmarks.ants.run.AntsRunner"
}
baseName = project.name + "-all"
from { configurations.compile.collect { it.directory ? it : zipTree(it) } }
with jar
}
dependencies {
apt "org.openjdk.jmh:jmh-generator-annprocess:${jmh.jmhVersion}" // jmh benchmarking
compile "org.openjdk.jmh:jmh-core:${jmh.jmhVersion}"// jmh
compile "org.slf4j:slf4j-api:1.7.+" // logging-api
// compile "org.slf4j:slf4j-ext:1.7.+" // manual performance measures
compile "ch.qos.logback:logback-classic:1.1.+" // logger
compile "com.google.code.findbugs:jsr305:3.0.+" // QA annotations
compile "com.google.guava:guava:19.+" // commons lib
testCompile "junit:junit:4.+" // main tests lib
// testCompile "org.mockito:mockito-core:1.10.+" // mocks
}