@@ -5,6 +5,7 @@ plugins {
5
5
id(" org.jetbrains.kotlinx.kover" ) version " 0.7.0-Alpha"
6
6
kotlin(" plugin.serialization" ) version " 1.8.10"
7
7
`maven- publish`
8
+ signing
8
9
}
9
10
10
11
group = " nl.sanderdijkhuis"
@@ -19,6 +20,11 @@ dependencies {
19
20
testImplementation(" org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0" )
20
21
}
21
22
23
+ java {
24
+ withJavadocJar()
25
+ withSourcesJar()
26
+ }
27
+
22
28
kotlin {
23
29
jvmToolchain(17 )
24
30
}
@@ -47,7 +53,36 @@ koverReport {
47
53
publishing {
48
54
publications {
49
55
create<MavenPublication >(" maven" ) {
56
+ artifactId = " noise-kotlin"
50
57
from(components[" java" ])
58
+ pom {
59
+ name.set(" Noise for Kotlin" )
60
+ description.set(" Noise protocols based on Diffie-Hellman key agreement" )
61
+ url.set(" https://github.com/sander/noise-kotlin" )
62
+ licenses {
63
+ license {
64
+ name.set(" MIT License" )
65
+ url.set(" https://github.com/sander/noise-kotlin/blob/main/LICENSE.md" )
66
+ }
67
+ }
68
+ scm {
69
+ connection.set(" scm:git:git://github.com/sander/noise-kotlin.git" )
70
+ developerConnection.set(" scm:git:ssh://github.com/sander/noise-kotlin.git" )
71
+ url.set(" http://github.com/sander/noise-kotlin" )
72
+ }
73
+ }
51
74
}
52
75
}
76
+ repositories {
77
+ maven {
78
+ val releasesRepoUrl = uri(" https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" )
79
+ val snapshotsRepoUrl = uri(" https://s01.oss.sonatype.org/content/repositories/snapshots/" )
80
+ url = if (version.toString().endsWith(" SNAPSHOT" )) snapshotsRepoUrl else releasesRepoUrl
81
+ credentials(PasswordCredentials ::class .java)
82
+ }
83
+ }
84
+ }
85
+
86
+ signing {
87
+ sign(publishing.publications[" maven" ])
53
88
}
0 commit comments