-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
145 lines (126 loc) · 3.57 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
buildscript {
repositories {
mavenCentral()
}
ext.kotlin_version = '2.0.21'
ext.versions = [
junit: '5.9.1',
]
}
plugins {
id 'java'
id 'signing'
id 'maven-publish'
id 'jacoco'
id 'pl.allegro.tech.build.axion-release' version '1.18.16'
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
id 'org.jetbrains.kotlin.jvm' version "${kotlin_version}"
}
repositories {
mavenCentral()
}
scmVersion {
versionCreator("versionWithBranch")
}
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
project.group = 'pl.allegro.tech'
project.version = scmVersion.version
dependencies {
implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: kotlin_version
implementation group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: kotlin_version
implementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: versions.junit
testImplementation group: 'com.willowtreeapps.assertk', name: 'assertk-jvm', version: '0.28.1'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: versions.junit
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: versions.junit
}
compileKotlin {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11
}
}
java {
withSourcesJar()
withJavadocJar()
}
test {
useJUnitPlatform()
testLogging {
exceptionFormat = 'full'
}
}
jacoco {
toolVersion = '0.8.2'
}
jacocoTestReport {
reports {
xml.required = true
html.required = true
}
}
publishing {
publications {
sonatype(MavenPublication) {
artifactId = "spunit"
from components.java
pom {
name = 'spunit'
description = 'Spunit test framework'
url = 'https://github.com/allegro/spunit'
inceptionYear = '2022'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'kochmap'
name = 'Piotr Kochmański'
}
}
scm {
connection = 'scm:[email protected]:allegro/spunit.git'
developerConnection = 'scm:[email protected]:allegro/spunit.git'
url = 'https://github.com/allegro/spunit'
}
}
}
}
repositories {
maven {
if (version.toString().endsWith("SNAPSHOT")) {
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
} else {
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
}
}
}
}
nexusPublishing {
repositories {
sonatype {
username = System.getenv("SONATYPE_USERNAME")
password = System.getenv("SONATYPE_PASSWORD")
}
}
}
if (System.getenv("GPG_KEY_ID")) {
signing {
useInMemoryPgpKeys(
System.getenv("GPG_KEY_ID"),
System.getenv("GPG_PRIVATE_KEY"),
System.getenv("GPG_PRIVATE_KEY_PASSWORD")
)
sign publishing.publications
}
}
wrapper {
gradleVersion = '7.5.1'
}