forked from selenide/selenide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.gradle
76 lines (65 loc) · 2.52 KB
/
deploy.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
apply from: 'build.gradle'
apply plugin: 'signing'
defaultTasks 'clean', 'libs', 'test', 'install', 'uploadArchives'
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
// repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: "$sonatypeUsername", password: "$sonatypePassword")
}
pom.project {
name archivesBaseName
packaging 'jar'
description 'Selenide = concise API for Selenium WebDriver in unit-tests'
url 'https://github.com/codeborne/selenide'
scm {
url 'scm:git@github.com:codeborne/selenide.git'
connection 'scm:git@github.com:codeborne/selenide.git'
developerConnection 'scm:git@github.com:codeborne/selenide.git'
}
licenses {
license {
name 'GPL 1.0'
url 'http://www.gnu.org/copyleft/gpl.html'
distribution 'repo'
}
}
developers {
developer {
id 'asolntsev'
name 'Andrei Solntsev'
}
developer {
id 'angryziber'
name 'Anton Keks'
}
developer {
id 'maksim-sakki'
name 'Maksim Säkki'
}
developer {
id 'vadger'
name 'Vadim Gerasimov'
}
}
}
//mess with the generated pom to set the 'packaging' tag
pom.withXml { XmlProvider xmlProvider ->
def xml = xmlProvider.asString()
def pomXml = new XmlParser().parse(new ByteArrayInputStream(xml.toString().bytes))
pomXml.version[0] + { packaging('jar') }
def newXml = new StringWriter()
def printer = new XmlNodePrinter(new PrintWriter(newXml))
printer.preserveWhitespace = true
printer.print(pomXml)
xml.setLength(0)
xml.append(newXml.toString())
}
}
}
}