-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy pathpublish.gradle
More file actions
73 lines (64 loc) · 2.39 KB
/
publish.gradle
File metadata and controls
73 lines (64 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
apply plugin: 'maven-publish'
apply plugin: 'signing'
// Simple module-level publishing for manual upload to Central Portal
if (hasProperty("ossrhTokenPassword") || hasProperty("centralPassword")) {
publishing {
publications {
mavenJava(MavenPublication) {
// Set coordinates from gradle.properties
groupId = project.ext.publishGroupId
artifactId = project.name
version = project.version
// Include JAR artifacts and components for Java
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = getModuleName(project.name)
packaging = 'jar'
description = publishDescription
url = githubUrl
licenses {
license {
name = licenseName
url = licenseUrl
}
}
developers {
developer {
id = developerId
name = developerName
email = developerEmail
}
}
scm {
connection = scmConnection
developerConnection = scmDeveloperConnection
url = scmUrl
}
}
}
}
}
// Signing temporarily disabled - we'll add GPG signatures manually using command line
// signing {
// required { project.hasProperty("centralPassword") }
// useGpgCmd()
// sign publishing.publications.mavenJava
// }
}
// Helper function to get proper module names
def getModuleName(artifactId) {
switch(artifactId) {
case 'cloudinary-core':
return 'Cloudinary Core Library'
case 'cloudinary-http5':
return 'Cloudinary Apache HTTP 5 Library'
case 'cloudinary-taglib':
return 'Cloudinary Taglib Library'
case 'cloudinary-test-common':
return 'Cloudinary Test Common Library'
default:
return 'Cloudinary Java Library'
}
}