-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublishing.gradle
96 lines (88 loc) · 2.99 KB
/
publishing.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
//bootJar {
// enabled = false
//}
jar {
enabled = true
classifier = ""
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
task javadocJar(type: Jar) {
archiveClassifier.set('javadoc')
from javadoc
}
artifacts {
archives jar
archives sourcesJar
archives javadocJar
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId = "$group"
artifactId = 'lsd-distributed-mongodb-access'
version = "$version"
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = 'lsd-distributed-mongodb-access'
description = 'This is a MongoDB version of the data access for the distributed data storage.'
url = 'https://github.com/lsd-consulting/lsd-distributed-mongodb-access'
licenses {
license {
name = "The Apache Software License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution = "repo"
}
}
developers {
developer {
name = "Lukasz"
email = "[email protected]"
organization = 'Integreety Ltd.'
organizationUrl = 'https://www.integreety.co.uk'
}
developer {
name = "Nick"
email = "[email protected]"
organization = 'NKM IT Solutions'
organizationUrl = 'https://github.com/nickmcdowall'
}
}
scm {
url = "https://github.com/lsd-consulting/lsd-distributed-mongodb-access.git"
}
}
repositories {
maven {
name = 'sonatype'
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials(PasswordCredentials)
}
}
}
}
}
nexusPublishing {
repositories {
sonatype { //only for users registered in Sonatype after 24 Feb 2021
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}
signing {
if (project.findProperty("signingKey")) {
// Use in-memory ascii-armored keys
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
} else {
// Use signing properties in ~/.gradle/gradle.properties
sign publishing.publications.mavenJava
}
}