Skip to content

Commit 9d0e524

Browse files
committed
Add publish to build.gradle
1 parent 9f50a6a commit 9d0e524

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

app/build.gradle

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
plugins {
1010
// Apply the application plugin to add support for building a CLI application in Java.
1111
id 'application'
12+
id 'maven-publish'
1213
}
1314

1415
repositories {
@@ -33,3 +34,17 @@ tasks.named('test') {
3334
// Use JUnit Platform for unit tests.
3435
useJUnitPlatform()
3536
}
37+
38+
publishing {
39+
40+
repositories {
41+
maven {
42+
name = "OSSRH"
43+
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
44+
credentials {
45+
username = System.getenv("MAVEN_USERNAME")
46+
password = System.getenv("MAVEN_PASSWORD")
47+
}
48+
}
49+
}
50+
}

0 commit comments

Comments
 (0)