-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle
More file actions
107 lines (87 loc) · 2.46 KB
/
build.gradle
File metadata and controls
107 lines (87 loc) · 2.46 KB
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
buildscript {
ext.kotlin_version = '1.2.30'
ext.spek_version = '1.1.5'
repositories { jcenter() }
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.16"
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.1.0'
}
}
plugins {
id 'java-library'
id 'jacoco'
id 'maven-publish'
id 'groovy'
id 'com.jfrog.bintray' version '1.8.0'
id 'org.shipkit.java' version '2.0.7'
id 'com.diffplug.gradle.spotless' version '3.10.0'
id 'com.github.ben-manes.versions' version '0.17.0'
}
apply plugin: 'kotlin'
apply plugin: 'org.jetbrains.dokka'
group 'com.github.magneticflux'
repositories {
jcenter()
maven { url 'http://dl.bintray.com/jetbrains/spek' }
}
compileJava {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
test {
useJUnitPlatform { includeEngines 'spek', 'junit-vintage' }
}
publishing {
publications {
myPublication(MavenPublication) {
from components.java
//noinspection GroovyAssignabilityCheck
artifact sourcesJar
//noinspection GroovyAssignabilityCheck
artifact dokkaJavadocJar
}
}
}
dokka {
outputFormat = 'javadoc'
jdkVersion = 7
impliedPlatforms = ["JVM"]
}
task dokkaJavadocJar(type: Jar, dependsOn: dokka) {
classifier = 'javadoc'
//noinspection GroovyAssignabilityCheck
from dokka.outputDirectory
}
spotless {
kotlin { ktlint('0.15.1') }
groovy { greclipse() }
groovyGradle { greclipse() }
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
api 'org.simpleframework:simple-xml:2.7.1'
api 'org.threeten:threetenbp:1.3.6'
// Tests
testImplementation 'org.hamcrest:java-hamcrest:2.0.0.0'
// Spock
testImplementation 'org.codehaus.groovy:groovy-all:2.4.13'
testImplementation "org.spockframework:spock-core:1.1-groovy-2.4"
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.1.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.1.0'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.1.0'
testCompileOnly 'junit:junit:4.12'
// Spek
testImplementation "org.jetbrains.spek:spek-api:$spek_version"
testImplementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
testRuntimeOnly "org.jetbrains.spek:spek-junit-platform-engine:$spek_version"
}
jacocoTestReport {
sourceSets sourceSets.main
dependsOn test
reports {
//noinspection GroovyAssignabilityCheck
xml { enabled true }
}
}
check.dependsOn(jacocoTestReport)