-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublishing.gradle
70 lines (63 loc) · 2.73 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
apply plugin: 'maven-publish'
apply plugin: 'signing'
signing {
def signingKeyId = findProperty("signingKeyId")
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign publishing.publications
}
publishing {
publications {
def maven = create(project.name, MavenPublication) {
group = project.group
version project.version
it.artifact(project.tasks.sourcesJar)
it.artifact(project.tasks.javadocJar)
it.artifact(project.tasks.jar)
it.pom.withXml {
def dependenciesNode = asNode().appendNode("dependencies")
project.configurations.compileOnly.dependencies.each {
if (!(it instanceof SelfResolvingDependency)) {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
dependencyNode.appendNode('scope', 'provided')
}
}
project.configurations.api.dependencies.each {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
dependencyNode.appendNode('scope', 'compile')
}
}
// Mostly self-explanatory metadata
pom {
name = "Springed-RSocket"
description = 'A simple Spring Boot starter for RSocket RPC.'
url = 'https://github.com/iamceph/springed-rsocket'
licenses {
license {
name = 'GPL-3.0 License'
url = 'https://www.gnu.org/licenses/gpl-3.0.html'
}
}
developers {
developer {
id = 'iamceph'
name = 'Frantisek Novosad'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:github.com/iamceph/springed-rsocket.git'
developerConnection = 'scm:git:ssh://github.com/iamceph/springed-rsocket.git'
url = 'https://github.com/iamceph/springed-rsocket/tree/main'
}
}
}
}
}