-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
73 lines (66 loc) · 2.02 KB
/
build.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
plugins {
id("snapshot-tests.git")
id("net.researchgate.release") version "3.0.2"
id("io.github.gradle-nexus.publish-plugin") version "1.2.0"
id("com.github.breadmoirai.github-release") version "2.4.1"
}
tasks.named("afterReleaseBuild").configure {
dependsOn(provider {
subprojects
.findAll { it.getPluginManager().hasPlugin("snapshot-tests.publishing-conventions") }
.collect { it.getTasks().named("publishToSonatype") }
})
dependsOn("commitFilesToGit")
}
tasks.register("commitFilesToGit") {
onlyIf { !version.endsWith("-SNAPSHOT") }
dependsOn(":snapshot-tests-documentation:deployDocsToRepositoryRoot", ":readme:generateReadmeAndReleaseNotes")
group "release"
description "Commit changed/generated files during release"
doLast {
git("add README.md RELEASE_NOTES.md")
git("add --force docs/*")
git("commit -m \"Update README and RELEASE_NOTES\"")
}
}
release {
pushReleaseVersionBranch = 'main'
tagTemplate = 'v$version'
git {
requireBranch.set("dev")
}
}
githubRelease {
token provider({ project.findProperty("gh_token") })
owner githubUser
repo githubRepo
draft true
body provider({
file("RELEASE_NOTES.md").getText()
})
}
nexusPublishing {
repositories {
sonatype {
username = findProperty("sonatype_USR")
password = findProperty("sonatype_PSW")
}
}
}
ext {
bomProjects = Set.of(
projects.snapshotTestsCore,
projects.snapshotTestsJunit4,
projects.snapshotTestsJunit5,
projects.snapshotTestsHtml,
projects.snapshotTestsJackson,
projects.snapshotTestsJson,
projects.snapshotTestsJaxb,
projects.snapshotTestsXmlLegacy,
projects.snapshotTestsXml,
projects.snapshotTestsJaxbJakarta,
projects.snapshotTestsNormalize,
projects.snapshotTestsDirectoryParams,
projects.diffTool
);
}