Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit 5935054

Browse files
committed
Reworked publishing to use maven-publish
Bumped up Gradle wrapper to 7.1, which no longer uses deprecated "maven" plugin, which includes "uploadArchives".
1 parent 53c5f83 commit 5935054

File tree

2 files changed

+28
-34
lines changed

2 files changed

+28
-34
lines changed

build.gradle

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
plugins {
22
id "java-library"
33
id "maven-publish"
4-
id "maven"
54
id "signing"
65
id "com.github.jk1.dependency-license-report" version "1.3"
76
id "io.snyk.gradle.plugin.snykplugin" version "0.4"
@@ -70,52 +69,47 @@ signing {
7069
sign configurations.archives
7170
}
7271

73-
uploadArchives {
74-
repositories {
75-
mavenDeployer {
76-
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
77-
repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
78-
authentication(userName: ossrhUsername, password: ossrhPassword)
79-
}
80-
snapshotRepository(url: "https://s01.oss.sonatype.org/content/repositories/snapshots/") {
81-
authentication(userName: ossrhUsername, password: ossrhPassword)
82-
}
83-
pom.project {
84-
name '${group}:${project.name}'
85-
packaging 'jar'
86-
description 'Library that adds functionality on top of the MarkLogic Java Client'
87-
url 'https://github.com/marklogic-community/${project.name}'
88-
scm {
89-
url '[email protected]:marklogic-community/${project.name}.git'
90-
connection 'scm:[email protected]:marklogic-community/${project.name}.git'
91-
developerConnection 'scm:[email protected]:marklogic-community/${project.name}.git'
92-
}
72+
publishing {
73+
publications {
74+
mainJava(MavenPublication) {
75+
pom {
76+
name = "${group}:${project.name}"
77+
description = "Library that adds functionality on top of the MarkLogic Java Client"
78+
url = "https://github.com/marklogic-community/${project.name}"
9379
licenses {
9480
license {
95-
name 'The Apache License, Version 2.0'
96-
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
81+
name = "The Apache License, Version 2.0"
82+
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
9783
}
9884
}
9985
developers {
10086
developer {
101-
id 'marklogic'
102-
name 'MarkLogic Github Contributors'
103-
87+
id = "marklogic"
88+
name = "MarkLogic Github Contributors"
89+
10490
}
10591
}
92+
scm {
93+
url = "[email protected]:marklogic-community/${project.name}.git"
94+
connection = "scm:[email protected]:marklogic-community/${project.name}.git"
95+
developerConnection = "scm:[email protected]:marklogic-community/${project.name}.git"
96+
}
10697
}
107-
}
108-
}
109-
}
110-
111-
publishing {
112-
publications {
113-
mainJava(MavenPublication) {
11498
from components.java
11599
artifact sourcesJar
116100
artifact javadocJar
117101
}
118102
}
103+
repositories {
104+
maven {
105+
name = "central"
106+
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
107+
credentials {
108+
username "$ossrhUsername"
109+
password "$ossrhPassword"
110+
}
111+
}
112+
}
119113
}
120114

121115
// See https://github.com/snyk/gradle-plugin for more information

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip

0 commit comments

Comments
 (0)