-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
142 lines (124 loc) · 3.39 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
buildscript{
ext {
kotlinVersion = '2.0.10'
kotlinCoroutinesVersion = '1.8.1'
junit5Version = '5.11.0'
}
}
plugins {
id("org.jetbrains.kotlin.jvm") version "$kotlinVersion"
id('java-library')
id("org.jetbrains.dokka") version "1.9.20"
id("org.jlleitschuh.gradle.ktlint") version "12.1.1"
id('idea')
id('signing')
id('maven-publish')
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}
group = "tech.relaycorp"
repositories {
mavenCentral()
}
dependencies {
// Use a version range to make it easy to upgrade the Awala library in the application code
api 'tech.relaycorp:awala:[1.68.5,2.0.0)'
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutinesVersion"
testImplementation("org.jetbrains.kotlin:kotlin-test")
testImplementation("org.junit.jupiter:junit-jupiter:$junit5Version")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junit5Version")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinCoroutinesVersion")
}
kotlin {
explicitApi()
}
java {
withJavadocJar()
withSourcesJar()
}
tasks.withType(KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
allWarningsAsErrors = true
}
}
test {
useJUnitPlatform()
}
// Documentation
dokkaHtml.configure {
dokkaSourceSets {
configureEach {
reportUndocumented.set(true)
}
}
}
// Publishing
signing {
useGpgCmd()
required { gradle.taskGraph.hasTask("publish") }
def signingKeyId = findProperty("signingKeyId")
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign publishing.publications
}
publishing {
publications {
create("default", MavenPublication) {
from(components["java"])
pom {
name.set(rootProject.name)
description.set("Testing utilities for Awala implementations on the JVM")
url.set("https://github.com/relaycorp/awala-testing-jvm")
developers {
developer {
id.set("relaycorp")
name.set("Relaycorp, Inc.")
email.set("[email protected]")
}
}
licenses {
license {
name.set("Apache-2.0")
}
}
scm {
connection.set("scm:git:https://github.com/relaycorp/awala-testing-jvm.git")
developerConnection.set(
"scm:git:https://github.com/relaycorp/awala-testing-jvm.git"
)
url.set("https://github.com/relaycorp/awala-testing-jvm")
}
}
}
}
repositories {
maven {
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(
uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
)
username.set(System.getenv("MAVEN_USERNAME"))
password.set(System.getenv("MAVEN_PASSWORD"))
}
}
}
tasks.publish {
finalizedBy("closeAndReleaseSonatypeStagingRepository")
}
ktlint {
version = "1.3.1"
}