Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d836d6e

Browse files
authored
Fix publish scripts
1 parent 4d2e62b commit d836d6e

File tree

8 files changed

+524
-366
lines changed

8 files changed

+524
-366
lines changed

‎MAVEN_CENTRAL_PUBLISHING_GUIDE.md‎

Lines changed: 437 additions & 0 deletions
Large diffs are not rendered by default.

‎build.gradle‎

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,18 @@
11
import groovy.json.JsonSlurper
22

33
plugins {
4-
id 'io.github.gradle-nexus.publish-plugin' version '1.0.0'
4+
id 'maven-publish'
5+
// Removed old nexus plugin - we'll create bundles manually for Central Portal
56
}
67

78
allprojects {
8-
99
repositories {
1010
mavenCentral()
1111
}
12-
1312
project.ext.set("publishGroupId", group)
1413
}
1514

16-
nexusPublishing {
17-
transitionCheckOptions {
18-
maxRetries.set(150)
19-
delayBetween.set(Duration.ofSeconds(5))
20-
}
21-
repositories {
22-
sonatype {
23-
username = project.hasProperty("ossrhToken") ? project.ext["ossrhToken"] : ""
24-
password = project.hasProperty("ossrhTokenPassword") ? project.ext["ossrhTokenPassword"] : ""
25-
}
26-
}
27-
}
15+
// Removed nexusPublishing block - we'll create bundles manually for Central Portal upload
2816

2917
tasks.create('createTestSubAccount') {
3018
doFirst {

‎cloudinary-core/build.gradle‎

Lines changed: 2 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
plugins {
22
id 'java-library'
3-
id 'signing'
4-
id 'maven-publish'
5-
id 'io.codearte.nexus-staging' version '0.21.1'
63
}
74

85
task ciTest( type: Test )
@@ -14,88 +11,6 @@ dependencies {
1411
}
1512

1613
apply from: "../java_shared.gradle"
14+
apply from: "../publish.gradle"
1715

18-
if (hasProperty("ossrhPassword")) {
19-
signing {
20-
sign configurations.archives
21-
}
22-
23-
24-
nexusStaging {
25-
packageGroup = group
26-
username = project.hasProperty("ossrhToken") ? project.ext["ossrhToken"] : ""
27-
password = project.hasProperty("ossrhTokenPassword") ? project.ext["ossrhTokenPassword"] : ""
28-
}
29-
30-
publishing {
31-
publications {
32-
mavenJava(MavenPublication) {
33-
from components.java
34-
artifact sourcesJar
35-
artifact javadocJar
36-
pom {
37-
name = 'Cloudinary Core Library'
38-
packaging = 'jar'
39-
groupId = publishGroupId
40-
artifactId = 'cloudinary-core'
41-
description = publishDescription
42-
url = githubUrl
43-
licenses {
44-
license {
45-
name = licenseName
46-
url = licenseUrl
47-
}
48-
}
49-
50-
developers {
51-
developer {
52-
id = developerId
53-
name = developerName
54-
email = developerEmail
55-
}
56-
}
57-
scm {
58-
connection = scmConnection
59-
developerConnection = scmDeveloperConnection
60-
url = scmUrl
61-
}
62-
}
63-
64-
pom.withXml {
65-
def pomFile = file("${project.buildDir}/generated-pom.xml")
66-
writeTo(pomFile)
67-
def pomAscFile = signing.sign(pomFile).signatureFiles[0]
68-
artifact(pomAscFile) {
69-
classifier = null
70-
extension = 'pom.asc'
71-
}
72-
}
73-
74-
// create the signed artifacts
75-
project.tasks.signArchives.signatureFiles.each {
76-
artifact(it) {
77-
def matcher = it.file =~ /-(sources|javadoc)\.jar\.asc$/
78-
if (matcher.find()) {
79-
classifier = matcher.group(1)
80-
} else {
81-
classifier = null
82-
}
83-
extension = 'jar.asc'
84-
}
85-
}
86-
}
87-
}
88-
89-
model {
90-
tasks.generatePomFileForMavenJavaPublication {
91-
destination = file("$buildDir/generated-pom.xml")
92-
}
93-
tasks.publishMavenJavaPublicationToMavenLocal {
94-
dependsOn project.tasks.signArchives
95-
}
96-
tasks.publishMavenJavaPublicationToSonatypeRepository {
97-
dependsOn project.tasks.signArchives
98-
}
99-
}
100-
}
101-
}
16+
// Publishing configuration moved to ../publish.gradle

‎cloudinary-http5/build.gradle‎

Lines changed: 2 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
plugins {
22
id 'java-library'
3-
id 'signing'
4-
id 'maven-publish'
5-
id 'io.codearte.nexus-staging' version '0.21.1'
63
}
74

85
apply from: "../java_shared.gradle"
6+
apply from: "../publish.gradle"
97

108
task ciTest( type: Test ) {
119
useJUnit {
@@ -27,87 +25,4 @@ dependencies {
2725
testCompile group: 'junit', name: 'junit', version: '4.12'
2826
}
2927

30-
if (hasProperty("ossrhPassword")) {
31-
32-
signing {
33-
sign configurations.archives
34-
}
35-
36-
nexusStaging {
37-
packageGroup = group
38-
username = project.hasProperty("ossrhToken") ? project.ext["ossrhToken"] : ""
39-
password = project.hasProperty("ossrhTokenPassword") ? project.ext["ossrhTokenPassword"] : ""
40-
}
41-
42-
publishing {
43-
publications {
44-
mavenJava(MavenPublication) {
45-
from components.java
46-
artifact sourcesJar
47-
artifact javadocJar
48-
pom {
49-
name = 'Cloudinary Apache HTTP 5 Library'
50-
packaging = 'jar'
51-
groupId = publishGroupId
52-
artifactId = 'cloudinary-http5'
53-
description = publishDescription
54-
url = githubUrl
55-
licenses {
56-
license {
57-
name = licenseName
58-
url = licenseUrl
59-
}
60-
}
61-
62-
developers {
63-
developer {
64-
id = developerId
65-
name = developerName
66-
email = developerEmail
67-
}
68-
}
69-
scm {
70-
connection = scmConnection
71-
developerConnection = scmDeveloperConnection
72-
url = scmUrl
73-
}
74-
}
75-
76-
pom.withXml {
77-
def pomFile = file("${project.buildDir}/generated-pom.xml")
78-
writeTo(pomFile)
79-
def pomAscFile = signing.sign(pomFile).signatureFiles[0]
80-
artifact(pomAscFile) {
81-
classifier = null
82-
extension = 'pom.asc'
83-
}
84-
}
85-
86-
// create the signed artifacts
87-
project.tasks.signArchives.signatureFiles.each {
88-
artifact(it) {
89-
def matcher = it.file =~ /-(sources|javadoc)\.jar\.asc$/
90-
if (matcher.find()) {
91-
classifier = matcher.group(1)
92-
} else {
93-
classifier = null
94-
}
95-
extension = 'jar.asc'
96-
}
97-
}
98-
}
99-
}
100-
101-
model {
102-
tasks.generatePomFileForMavenJavaPublication {
103-
destination = file("$buildDir/generated-pom.xml")
104-
}
105-
tasks.publishMavenJavaPublicationToMavenLocal {
106-
dependsOn project.tasks.signArchives
107-
}
108-
tasks.publishMavenJavaPublicationToSonatypeRepository {
109-
dependsOn project.tasks.signArchives
110-
}
111-
}
112-
}
113-
}
28+
// Publishing configuration moved to ../publish.gradle

‎cloudinary-taglib/build.gradle‎

Lines changed: 2 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
plugins {
22
id 'java-library'
3-
id 'signing'
4-
id 'maven-publish'
5-
id 'io.codearte.nexus-staging' version '0.21.1'
63
}
74

85
apply from: "../java_shared.gradle"
6+
apply from: "../publish.gradle"
97

108
task ciTest( type: Test )
119

@@ -22,87 +20,4 @@ dependencies {
2220
}
2321
}
2422

25-
if (hasProperty("ossrhPassword")) {
26-
27-
signing {
28-
sign configurations.archives
29-
}
30-
31-
nexusStaging {
32-
packageGroup = group
33-
username = project.hasProperty("ossrhToken") ? project.ext["ossrhToken"] : ""
34-
password = project.hasProperty("ossrhTokenPassword") ? project.ext["ossrhTokenPassword"] : ""
35-
}
36-
37-
publishing {
38-
publications {
39-
mavenJava(MavenPublication) {
40-
from components.java
41-
artifact sourcesJar
42-
artifact javadocJar
43-
pom {
44-
name = 'Cloudinary Taglib Library'
45-
packaging = 'jar'
46-
groupId = publishGroupId
47-
artifactId = 'cloudinary-taglib'
48-
description = publishDescription
49-
url = githubUrl
50-
licenses {
51-
license {
52-
name = licenseName
53-
url = licenseUrl
54-
}
55-
}
56-
57-
developers {
58-
developer {
59-
id = developerId
60-
name = developerName
61-
email = developerEmail
62-
}
63-
}
64-
scm {
65-
connection = scmConnection
66-
developerConnection = scmDeveloperConnection
67-
url = scmUrl
68-
}
69-
}
70-
71-
pom.withXml {
72-
def pomFile = file("${project.buildDir}/generated-pom.xml")
73-
writeTo(pomFile)
74-
def pomAscFile = signing.sign(pomFile).signatureFiles[0]
75-
artifact(pomAscFile) {
76-
classifier = null
77-
extension = 'pom.asc'
78-
}
79-
}
80-
81-
// create the signed artifacts
82-
project.tasks.signArchives.signatureFiles.each {
83-
artifact(it) {
84-
def matcher = it.file =~ /-(sources|javadoc)\.jar\.asc$/
85-
if (matcher.find()) {
86-
classifier = matcher.group(1)
87-
} else {
88-
classifier = null
89-
}
90-
extension = 'jar.asc'
91-
}
92-
}
93-
}
94-
}
95-
96-
model {
97-
tasks.generatePomFileForMavenJavaPublication {
98-
destination = file("$buildDir/generated-pom.xml")
99-
}
100-
tasks.publishMavenJavaPublicationToMavenLocal {
101-
dependsOn project.tasks.signArchives
102-
}
103-
tasks.publishMavenJavaPublicationToSonatypeRepository {
104-
dependsOn project.tasks.signArchives
105-
}
106-
}
107-
}
108-
}
23+
// Publishing configuration moved to ../publish.gradle

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /