This repository has been archived by the owner on Dec 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpublish.gradle
69 lines (61 loc) · 2.4 KB
/
publish.gradle
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
nexusPublishing {
useStaging = true
repositories {
sonatype {
// because we registered in Sonatype after 24 Feb 2021, we provide these URIs
// see: https://github.com/gradle-nexus/publish-plugin/blob/master/README.md
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username = System.getenv("SONATYPE_USERNAME")
password = System.getenv("SONATYPE_PASSWORD")
}
}
}
subprojects.findAll { it.name in ['hub-saml', 'hub-saml-test-utils'] }.each {proj ->
configure(proj) {
apply plugin: 'maven-publish'
apply plugin: 'signing'
java {
withJavadocJar()
withSourcesJar()
}
signing {
useInMemoryPgpKeys(
System.getenv("MAVEN_CENTRAL_SIGNING_KEY"),
System.getenv("MAVEN_CENTRAL_SIGNING_KEY_PASSWORD")
)
sign publishing.publications
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = proj.name
description = 'Library for ' + project.name
packaging = 'jar'
url = 'https://github.com/alphagov/verify-hub'
artifactId = proj.name
scm {
url = 'https://github.com/alphagov/verify-hub'
connection = 'scm:git:git://github.com/alphagov/verify-hub.git'
developerConnection = 'scm:git:ssh://[email protected]:alphagov/verify-hub.git'
}
licenses {
license {
name = 'MIT Licence'
url = 'https://github.com/alphagov/verify-hub/blob/master/LICENCE'
distribution = 'repo'
}
}
developers {
developer {
name = 'GDS Developers'
}
}
} // pom
}
}
}
}
}