-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbuild.gradle.kts
114 lines (96 loc) · 2.88 KB
/
build.gradle.kts
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
112
113
114
import groovy.lang.Closure
import java.net.URI
plugins {
`jvm-component`
`java-lang`
maven
jacoco
id("com.bmuschko.nexus") version "2.3.1"
id("com.diffplug.spotless") version "5.6.1"
id("org.jetbrains.kotlin.jvm") version "1.3.11"
}
group = "io.vavr"
version = "1.0.0-SNAPSHOT"
repositories {
mavenCentral()
maven {
url = URI("https://oss.sonatype.org/content/repositories/snapshots")
}
}
dependencies {
compile(kotlin("stdlib-jdk8"))
compile("io.vavr:vavr:1.0.0-SNAPSHOT")
testCompile("junit:junit:4.12")
}
tasks {
create<JacocoReport>("codeCoverageReport") {
executionData(fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec"))
sourceSets(sourceSets["main"])
reports {
xml.isEnabled = true
xml.destination = file("$buildDir/reports/jacoco/report.xml")
html.isEnabled = true
csv.isEnabled = false
}
dependsOn(project.getTasksByName("test", false))
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
spotless {
kotlin {
ktlint().userData(mapOf("disabled_rules" to "no-wildcard-imports"))
}
kotlinGradle {
ktlint().userData(mapOf("disabled_rules" to "no-wildcard-imports"))
}
}
jar {
manifest {
attributes(
mutableMapOf(
"Automatic-Module-Name" to "io.vavr.kotlin"
)
)
}
}
}
val modifyPom: Closure<MavenPom> by ext
modifyPom(
closureOf<MavenPom> {
project {
withGroovyBuilder {
"name"("Vavr Kotlin")
"description"("Vavr integration for Kotlin")
"url"("http://vavr.io")
"inceptionYear"("2017")
"scm" {
"connection"("scm:git:git@github.com:vavr-io/vavr-kotlin.git")
"developerConnection"("scm:git:git@github.com:vavr-io/vavr-kotlin.git")
"url"("git@github.com:vavr-io/vavr-kotlin.git")
}
"licenses" {
"license" {
"name"("The Apache Software License, Version 2.0")
"url"("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
"developers" {
"developer" {
"id"("zvozin")
"name"("Alex Zuzin")
"url"("https://github.com/zvozin")
}
"developer" {
"id"("ruslansennov")
"name"("Ruslan Sennov")
"email"("ruslan.sennov@gmail.com")
}
}
}
}
}
)
nexus {
sign = !version.toString().endsWith("SNAPSHOT")
}