-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
116 lines (101 loc) · 3.27 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
112
113
114
115
116
buildscript {
ext {
atrium_version = '0.18.0'
kotest_version = "4.4.3"
}
}
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.8.21'
id 'info.solidsoft.pitest' version '1.9.11'
id "org.jetbrains.dokka" version "1.8.20"
id "com.github.ben-manes.versions" version "0.46.0"
// publishing
id 'maven-publish'
id "io.codearte.nexus-staging" version "0.30.0"
id 'signing'
id "de.marcphilipp.nexus-publish" version "0.4.0"
}
group 'com.github.asm0dey'
version '0.0.2'
repositories {
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib"
implementation 'com.fasterxml.woodstox:woodstox-core:6.5.1'
testImplementation "org.jetbrains.kotlin:kotlin-reflect"
testImplementation ("io.kotest:kotest-runner-junit5:$kotest_version"){
exclude group: "org.jetbrains.kotlin"
}
testImplementation("ch.tutteli.atrium:atrium-infix-en_GB:$atrium_version"){
exclude group: "org.jetbrains.kotlin"
}
testImplementation ("io.kotest:kotest-plugins-pitest:$kotest_version"){
exclude group: "org.jetbrains.kotlin"
}
}
test {
useJUnitPlatform()
}
pitest {
testPlugin = "Kotest"
targetClasses = ['staks.*']
threads = 4
outputFormats = ['XML', 'HTML']
avoidCallsTo = ["kotlin.jvm.internal", "kotlinx.coroutines"]
}
artifacts {
archives jar
}
publishing {
publications {
mavenJava(MavenPublication) {
pom {
groupId = 'com.github.asm0dey'
artifactId = 'staks'
from components.kotlin
name = 'Staks'
description = 'Kotlin wrapper for StAX which allows object-oriented building of objects'
url = 'https://github.com/asm0dey/staks'
licenses {
license {
name = 'BSD-3-Clause License'
url = 'https://raw.githubusercontent.com/asm0dey/staks/main/LICENSE'
}
}
developers {
developer {
id = 'asm0dey'
name = 'Pasha Finkelshteyn'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/asm0dey/staks.git'
developerConnection = 'scm:git:ssh://github.com/asm0dey/staks.git'
url = 'https://github.com/asm0dey/staks/'
}
}
}
}
repositories {
maven {
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username "$ossrhAsm0dey"
password "$ossrhAsm0deyPass"
}
}
}
}
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
tasks.withType(Sign) {
onlyIf { isReleaseVersion && gradle.taskGraph.hasTask("publish") }
}
signing {
required { isReleaseVersion && gradle.taskGraph.hasTask("publish") }
useGpgCmd()
sign publishing.publications.mavenJava
}