Skip to content

Commit c592422

Browse files
committed
Add Maven publishing configuration to build script
1 parent e6bc264 commit c592422

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

gsma-tap-codec/build.gradle.kts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
plugins {
22
id("java-library")
3+
id("maven-publish")
34
id("io.github.codicis.asn1") version "0.2.0"
45
}
56

@@ -16,6 +17,25 @@ asn1 {
1617
}
1718
}
1819
}
20+
21+
publishing {
22+
publications {
23+
create<MavenPublication>("mavenJava") {
24+
from(components["java"])
25+
}
26+
}
27+
repositories {
28+
maven {
29+
name = "CentralPortal"
30+
url = uri("https://central.sonatype.com/api/v1/publish")
31+
credentials {
32+
username = findProperty("sonatypeUsername") as String? ?: System.getenv("SONATYPE_USERNAME")
33+
password = findProperty("sonatypePassword") as String? ?: System.getenv("SONATYPE_PASSWORD")
34+
}
35+
}
36+
}
37+
38+
}
1939
testing {
2040
suites {
2141
named("test", JvmTestSuite::class) {

0 commit comments

Comments
 (0)