-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbuild.gradle
111 lines (92 loc) · 2.91 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
101
102
103
104
105
106
107
108
109
110
111
buildscript {
ext.guice_version = '7.0.0'
ext.kotlin_version = '1.4.32'
repositories {
jcenter()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.github.ben-manes:gradle-versions-plugin:0.21.0"
classpath "org.jlleitschuh.gradle:ktlint-gradle:8.2.0"
classpath "io.spring.gradle:dependency-management-plugin:1.0.7.RELEASE"
classpath "me.champeau.gradle:jmh-gradle-plugin:0.4.8"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.18"
classpath "org.junit.platform:junit-platform-gradle-plugin:1.2.0"
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.junit.platform.gradle.plugin'
apply plugin: 'org.jetbrains.dokka'
apply plugin: "org.jlleitschuh.gradle.ktlint"
apply plugin: "me.champeau.gradle.jmh"
apply plugin: "com.github.ben-manes.versions"
sourceCompatibility = 1.8
group = GROUP
version = VERSION_NAME
repositories {
jcenter()
mavenCentral()
}
// Use Dokka instead
tasks.withType(Javadoc) { enabled = false }
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
dokka {
outputFormat = 'html'
outputDirectory = "$buildDir/javadoc"
externalDocumentationLink {
url = new URL("http://google.github.io/guice/api-docs/4.2/javadoc/")
}
}
junitPlatform {
filters {
engines {
include 'spek2'
}
}
}
jmh {
// For some reason jmh, the annotation processor, or the jmh-gradle-plugin is creating
// duplicates of the jmh generated classes; one in the build/jmh-generated-classes and
// one in the build/classes directory. This leads to duplicates being found when copying
// classes for the jar. Changing this to 'warn' allows us to run the benchmarks even though
// something isn't configured correctly somewhere.
duplicateClassesStrategy = 'warn'
}
ktlint {
version = "0.34.2"
}
sourceSets {
jmh
}
dependencyManagement {
dependencies {
dependency "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
dependency "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" // managing version up
dependency "com.google.inject:guice:$guice_version"
dependency "com.google.inject.extensions:guice-multibindings:$guice_version"
// Test Dependencies
dependency 'org.amshove.kluent:kluent:1.53'
dependency 'org.spekframework.spek2:spek-dsl-jvm:2.0.6'
dependency 'org.spekframework.spek2:spek-runner-junit5:2.0.6'
dependency 'org.junit.platform:junit-platform-runner:1.5.1'
}
}
dependencies {
jmh 'org.openjdk.jmh:jmh-core:1.21'
jmh 'org.openjdk.jmh:jmh-generator-annprocess:1.21'
}
build.dependsOn check
build.finalizedBy dokka
}