-
Notifications
You must be signed in to change notification settings - Fork 3
/
publish-maven.gradle
77 lines (71 loc) · 2.73 KB
/
publish-maven.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
apply plugin: 'maven-publish'
apply plugin: 'signing'
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact tasks.sourcesJar
artifact tasks.javadocJar
pom {
name = 'Zebrunner TestNG agent'
description = 'Zebrunner TestNG agent library'
url = 'https://github.com/zebrunner/java-agent-testng'
organization {
name = 'Zebrunner'
url = 'https://zebrunner.com'
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'nsidorevich'
name = 'Nikita Sidorevich'
email = '[email protected]'
}
developer {
id = 'brutskov'
name = 'Bogdan Rutskov'
email = '[email protected]'
}
}
scm {
connection = 'https://github.com/zebrunner/java-agent-testng.git'
developerConnection = '[email protected]:zebrunner/java-agent-testng.git'
url = 'https://github.com/zebrunner/java-agent-testng'
}
issueManagement {
system = 'GitHub'
url = 'https://github.com/zebrunner/java-agent-testng/issues'
}
}
}
}
repositories {
maven {
name = 'MavenCentral'
url = project.findProperty('publishing.maven.repo.url') ?: System.getenv('PUBLISHING_MAVEN_REPO_URL')
credentials {
username = project.findProperty('publishing.maven.username') ?: System.getenv('PUBLISHING_MAVEN_USER')
password = project.findProperty('publishing.maven.password') ?: System.getenv('PUBLISHING_MAVEN_PASSWORD')
}
}
}
}
signing {
def signingKey = project.findProperty('signing.key') ?: System.getenv('SIGNING_KEY')
def signingPassword = project.findProperty('signing.password') ?: System.getenv('SIGNING_PASSWORD')
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}