File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11plugins {
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
79group ' org.moormanity'
@@ -22,6 +24,8 @@ dependencies {
2224java {
2325 sourceCompatibility = " 1.8"
2426 targetCompatibility = " 1.8"
27+ withJavadocJar()
28+ withSourcesJar()
2529}
2630
2731test {
@@ -36,14 +40,17 @@ jacocoTestReport {
3640
3741
3842publishing {
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}
You can’t perform that action at this time.
0 commit comments