1
1
import org.gradle.internal.os.OperatingSystem
2
2
3
3
plugins {
4
+ id ' java'
4
5
id ' java-library'
5
6
id ' maven-publish'
6
7
id ' jacoco'
@@ -71,6 +72,21 @@ javadoc {
71
72
}
72
73
}
73
74
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
+
74
90
if (isMerge || isRelease) {
75
91
nexusPublishing {
76
92
repositories {
@@ -87,18 +103,14 @@ if (isMerge || isRelease) {
87
103
publishing {
88
104
publications {
89
105
mavenJava(MavenPublication ) {
90
- artifactId = archivesBaseName
91
106
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
100
109
pom {
101
- name = ' JNats Json'
110
+ name = rootProject. name
111
+ packaging = ' jar'
112
+ groupId = group
113
+ artifactId = archivesBaseName
102
114
description = ' JSON Parser built specifically for JNATS'
103
115
url = ' https://github.com/nats-io/nats.java.json'
104
116
licenses {
@@ -112,7 +124,7 @@ publishing {
112
124
id = " synadia"
113
125
name = " Synadia"
114
126
email = " info@synadia.com"
115
- url = " https://synadia .io"
127
+ url = " https://nats .io"
116
128
}
117
129
}
118
130
scm {
@@ -121,14 +133,6 @@ publishing {
121
133
}
122
134
}
123
135
}
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
- // }
132
136
}
133
137
134
138
if (isRelease) {
0 commit comments