11import org.gradle.internal.os.OperatingSystem
22
33plugins {
4+ id ' java'
45 id ' java-library'
56 id ' maven-publish'
67 id ' jacoco'
@@ -71,6 +72,21 @@ javadoc {
7172 }
7273}
7374
75+ jacoco {
76+ toolVersion = " 0.8.13"
77+ }
78+
79+ jacocoTestReport {
80+ reports {
81+ xml. required = true // coveralls plugin depends on xml format report
82+ html. required = true
83+ }
84+ }
85+
86+ artifacts {
87+ archives javadocJar, sourcesJar
88+ }
89+
7490if (isMerge || isRelease) {
7591 nexusPublishing {
7692 repositories {
@@ -87,18 +103,14 @@ if (isMerge || isRelease) {
87103publishing {
88104 publications {
89105 mavenJava(MavenPublication ) {
90- artifactId = archivesBaseName
91106 from components. java
92- versionMapping {
93- usage(' java-api' ) {
94- fromResolutionOf(' runtimeClasspath' )
95- }
96- usage(' java-runtime' ) {
97- fromResolutionResult()
98- }
99- }
107+ artifact sourcesJar
108+ artifact javadocJar
100109 pom {
101- name = ' JNats Json'
110+ name = rootProject. name
111+ packaging = ' jar'
112+ groupId = group
113+ artifactId = archivesBaseName
102114 description = ' JSON Parser built specifically for JNATS'
103115 url = ' https://github.com/nats-io/nats.java.json'
104116 licenses {
@@ -112,7 +124,7 @@ publishing {
112124 id = " synadia"
113125 name = " Synadia"
114126115- url = " https://synadia .io"
127+ url = " https://nats .io"
116128 }
117129 }
118130 scm {
@@ -121,14 +133,6 @@ publishing {
121133 }
122134 }
123135 }
124- // repositories {
125- // maven {
126- // // change URLs to point to your repos, e.g. http://my.org/repo
127- // def releasesRepoUrl = "https://ossrh-staging-api.central.sonatype.com/service/local/"
128- // def snapshotsRepoUrl = layout.buildDirectory.dir("https://central.sonatype.com/repository/maven-snapshots/")
129- // url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
130- // }
131- // }
132136}
133137
134138if (isRelease) {
0 commit comments