-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
100 lines (81 loc) · 2.67 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
buildscript {
ext {
kotlin_version = '1.1.3'
kotlin_coroutines_version = '0.16'
junit5_plugin_version = '1.0.0-M4'
spek_version = '1.1.2'
jmh_version = '1.19'
jackson_version = '2.8.9'
}
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.junit.platform:junit-platform-gradle-plugin:$junit5_plugin_version"
classpath "me.champeau.gradle:jmh-gradle-plugin:0.3.1"
}
}
apply plugin: 'kotlin'
apply plugin: 'org.junit.platform.gradle.plugin'
apply plugin: "me.champeau.gradle.jmh"
group = 'de.gtrefs'
version = '0.0.1-SNAPSHOT'
// Plugin configurations
junitPlatform {
filters {
engines {
include 'spek'
}
}
}
kotlin {
experimental {
coroutines "enable"
}
}
jmh {
iterations = 10
warmupIterations = 10
fork = 2
threads = 1
profilers = ["stack"]
}
// configurations and source sets
sourceSets {
examples {
compileClasspath += sourceSets.test.compileClasspath
runtimeClasspath += sourceSets.test.runtimeClasspath
}
benchmark {
compileClasspath += sourceSets.test.compileClasspath
runtimeClasspath += sourceSets.test.runtimeClasspath
}
}
["examples", "benchmark"].findAll {project.hasProperty(it)}.each {
def sourceSet = sourceSets.maybeCreate(it)
sourceSets.test.kotlin.srcDirs += sourceSet.kotlin.srcDirs
sourceSets.test.resources.srcDirs += sourceSet.resources.srcDirs
}
repositories {
jcenter()
maven { url "http://dl.bintray.com/jetbrains/spek" }
maven { url "https://kotlin.bintray.com/kotlinx/" }
}
dependencies {
compile "com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version"
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
compile "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version"
compile "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$kotlin_coroutines_version"
testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
testCompile "com.winterbe:expekt:0.5.0"
testCompile "org.jetbrains.spek:spek-api:$spek_version"
testRuntime "org.jetbrains.spek:spek-junit-platform-engine:$spek_version"
jmh group: 'org.openjdk.jmh', name: 'jmh-core', version: "$jmh_version"
jmh group: 'org.openjdk.jmh', name: 'jmh-generator-annprocess', version: "$jmh_version"
}