-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
102 lines (82 loc) · 2.35 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
group 'com.ornoyman'
version '0.0.1'
buildscript {
ext.kotlin_version = '1.2.41'
repositories {
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "http://dl.bintray.com/jetbrains/spek" }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0'
}
}
apply plugin: 'org.junit.platform.gradle.plugin'
apply plugin: 'kotlin'
apply plugin: 'maven-publish'
apply plugin: "jacoco"
repositories {
jcenter()
}
junitPlatform {
filters {
engines {
include 'spek'
}
}
details 'tree'
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled true
}
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
testCompile('org.jetbrains.spek:spek-api:1.1.5') {
exclude group: 'org.jetbrains.kotlin'
}
testRuntime('org.jetbrains.spek:spek-junit-platform-engine:1.1.5') {
exclude group: 'org.junit.platform'
exclude group: 'org.jetbrains.kotlin'
}
testRuntime('org.junit.platform:junit-platform-runner:1.0.0')
testCompile 'org.junit.platform:junit-platform-console:1.0.0'
testCompile("org.junit.jupiter:junit-jupiter-api:5.0.2")
testRuntime("org.junit.jupiter:junit-jupiter-engine:5.0.2")
}
task wrapper(type: Wrapper) {
gradleVersion = '4.4.1'
}
publishing {
publications {
maven(MavenPublication) {
from components.java
pom.withXml {
asNode().dependencies.'*'.findAll() {
it.scope.text() == 'runtime' && project.configurations.compile.allDependencies.find { dep ->
dep.name == it.artifactId.text()
}
}.each() {
it.scope*.value = 'compile'
}
}
}
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
model {
tasks.generatePomFileForMavenPublication {
destination = file("$buildDir/libs/kovfefe-" + version + ".pom")
}
}