Skip to content

Commit fd04804

Browse files
committed
gradle section to publish to maven central
1 parent 99521b7 commit fd04804

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

build.gradle

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,17 @@ publishing {
7474
}
7575
}
7676
}
77+
repositories {
78+
maven {
79+
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
80+
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
81+
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
82+
credentials {
83+
username sonatypeUsername
84+
password sonatypePassword
85+
}
86+
}
87+
}
7788
}
7889

7990
signing {

gradle.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
org.gradle.jvmargs=-Dfile.encoding=UTF-8
1+
org.gradle.jvmargs=-Dfile.encoding=UTF-8
2+
sonatypeUsername=
3+
sonatypePassword=

0 commit comments

Comments
 (0)