forked from testng-team/testng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
56 lines (49 loc) · 1.76 KB
/
build.gradle.kts
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
plugins {
id("testng.repositories")
id("com.github.vlsi.stage-vote-release")
id("idea")
}
val String.v: String get() = rootProject.extra["$this.version"] as String
val buildVersion = "testng".v + releaseParams.snapshotSuffix
version = buildVersion
println("Building testng $buildVersion")
/**
* Release procedure:
* 1. ./gradlew prepareVote -Prc=1 -Pgh (builds artifacts, stages them to Central, closes staging repository)
* 2. ./gradlew publishDist -Prc=1 -Pgh (publishes staging repository and pushes release tag)
*
* See https://github.com/vlsi/vlsi-release-plugins#stage-vote-release-plugin
* The following properties (e.g. $HOME/.gradle/gradle.properties) configure credentials.
* The plugin would raise a warning if the property is not found.
* signing.gnupg.keyName=...
* signing.password=...
* signing.secretKeyRingFile=...
* ghNexusUsername=...
* ghNexusPassword=...
* ghGitSourceUsername=...
* ghGitSourcePassword=...
*
* You can use https://github.com/vlsi/asflike-release-environment as a playground to dry run releases.
*/
fun property(name: String) =
providers.gradleProperty(name)
releaseParams {
tlp.set(property("github.repository"))
organizationName.set(property("github.organization"))
componentName.set(property("project.name"))
prefixForProperties.set("gh")
svnDistEnabled.set(false)
sitePreviewEnabled.set(false)
releaseTag.set(buildVersion) // or "testng-$buildVersion"
nexus {
packageGroup.set(property("nexus.profile"))
mavenCentral()
}
voteText.set {
"""
${it.componentName} v${it.version}-rc${it.rc} is ready for preview.
Git SHA: ${it.gitSha}
Staging repository: ${it.nexusRepositoryUri}
""".trimIndent()
}
}