-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
125 lines (111 loc) · 3.37 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
115
116
117
118
119
120
121
122
123
124
125
import java.net.URL
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "2.0.20"
id("org.jetbrains.kotlinx.kover") version "0.7.6"
kotlin("plugin.serialization") version "2.0.20"
`maven-publish`
signing
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
id("org.jetbrains.dokka") version "1.9.20"
}
group = "nl.sanderdijkhuis"
version = "1.1.0-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
testImplementation(kotlin("test"))
testImplementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.2")
testImplementation("org.bouncycastle:bcprov-jdk18on:1.78.1")
testImplementation("org.bouncycastle:bcpkix-jdk18on:1.78.1")
}
java {
withJavadocJar()
withSourcesJar()
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
vendor.set(JvmVendorSpec.AZUL)
implementation.set(JvmImplementation.VENDOR_SPECIFIC)
}
}
kotlin {
jvmToolchain(8)
}
tasks.test {
useJUnitPlatform()
}
tasks.withType<DokkaTask> {
dokkaSourceSets {
named("main") {
moduleName.set("Noise for Kotlin")
includes.from("src/main/README.md")
skipDeprecated.set(true)
sourceLink {
localDirectory.set(file("src/main/kotlin"))
remoteUrl.set(URL("https://github.com/sander/noise-kotlin/tree/main/src/main/kotlin"))
remoteLineSuffix.set("#L")
}
}
}
}
tasks.withType<KotlinCompile> {
kotlinOptions.allWarningsAsErrors = true
kotlinOptions.jvmTarget = "1.8"
}
koverReport {
defaults {
verify {
onCheck = true
rule {
bound {
metric = kotlinx.kover.gradle.plugin.dsl.MetricType.BRANCH
minValue = 55
}
}
}
}
}
publishing {
publications {
create<MavenPublication>("maven") {
artifactId = "noise-kotlin"
from(components["java"])
pom {
name.set("Noise for Kotlin")
description.set("Noise protocols based on Diffie-Hellman key agreement")
url.set("https://github.com/sander/noise-kotlin")
licenses {
license {
name.set("MIT License")
url.set("https://github.com/sander/noise-kotlin/blob/main/LICENSE.md")
}
}
scm {
connection.set("scm:git:git://github.com/sander/noise-kotlin.git")
developerConnection.set("scm:git:ssh://github.com/sander/noise-kotlin.git")
url.set("https://github.com/sander/noise-kotlin")
}
developers {
developer {
id.set("sander")
name.set("Sander Dijkhuis")
email.set("[email protected]")
}
}
}
}
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}
signing {
sign(publishing.publications["maven"])
}