-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
126 lines (119 loc) · 3.63 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
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.9.25'
id 'maven-publish'
id 'org.jetbrains.kotlinx.kover' version '0.9.1'
id 'io.github.gradle-nexus.publish-plugin' version "2.0.0"
id 'com.palantir.git-version' version '3.1.0'
id 'org.jreleaser' version '1.16.0'
}
group 'io.github.ludorival'
version gitVersion().replace(".dirty", "-SNAPSHOT")
java {
withJavadocJar()
withSourcesJar()
sourceCompatibility(JavaVersion.VERSION_1_8)
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'kotlin-tdd'
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'Kotlin TDD'
description = 'Interface to use the Test Driven Design paradigm with internal state management'
url = 'https://github.com/ludorival/kotlin-tdd'
licenses {
license {
name = 'MIT License'
url = 'https://github.com/ludorival/kotlin-tdd/blob/main/LICENSE'
}
}
developers {
developer {
id = 'ludorival'
name = 'Ludovic Dorival'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/ludorival/kotlin-tdd.git'
developerConnection = 'scm:git:ssh://github.com/ludorival/kotlin-tdd.git'
url = 'https://github.com/ludorival/kotlin-tdd'
}
}
}
}
repositories {
maven {
url = uri("$buildDir/staging-deploy")
}
}
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
repositories {
mavenCentral()
}
test {
useJUnitPlatform()
}
kover.reports.verify.rule {
minBound(93)
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib"
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.4'
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.9.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.11.4'
}
jreleaser {
project {
name = 'kotlin-tdd'
description = 'A Kotlin library for Test-Driven Development'
longDescription = '''
A Kotlin library that provides utilities and patterns
for practicing Test-Driven Development effectively
'''
authors = ['Ludovic Dorival']
license = 'MIT License'
copyright = 'Copyright (c) 2024 Ludovic Dorival'
links {
homepage = 'https://github.com/ludorival/kotlin-tdd'
}
}
signing {
active = 'ALWAYS'
armored = true
}
deploy {
maven {
mavenCentral {
sonatype {
applyMavenCentralRules = true
password = System.getenv('MAVEN_CENTRAL_PASSWORD')
username = System.getenv('MAVEN_CENTRAL_USERNAME')
active = 'ALWAYS'
url = "https://central.sonatype.com/api/v1/publisher"
stagingRepository('build/staging-deploy')
}
}
}
}
}