Skip to content

Commit 0be7fa0

Browse files
authored
Merge pull request #11 from moormanm/sonatype
initial
2 parents 26da2a8 + eb9e906 commit 0be7fa0

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

build.gradle

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
plugins {
2-
id 'java'
2+
id 'java-library'
33
id 'jacoco'
44
id 'maven-publish'
5+
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
6+
id 'signing'
57
}
68

79
group 'org.moormanity'
@@ -22,6 +24,8 @@ dependencies {
2224
java {
2325
sourceCompatibility = "1.8"
2426
targetCompatibility = "1.8"
27+
withJavadocJar()
28+
withSourcesJar()
2529
}
2630

2731
test {
@@ -36,14 +40,17 @@ jacocoTestReport {
3640

3741

3842
publishing {
43+
publications {
44+
mavenJava(MavenPublication) {
45+
from(components.java)
46+
}
47+
}
48+
}
49+
nexusPublishing {
3950
repositories {
40-
maven {
41-
name = "OSSRH"
42-
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
43-
credentials {
44-
username = System.getenv("MAVEN_USERNAME")
45-
password = System.getenv("MAVEN_PASSWORD")
46-
}
51+
sonatype { //only for users registered in Sonatype after 24 Feb 2021
52+
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
53+
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
4754
}
4855
}
4956
}

0 commit comments

Comments
 (0)