-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
46 lines (38 loc) · 1.04 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
buildscript {
repositories {
mavenCentral()
}
}
plugins {
// Auto Update Versions
id 'se.patrikerdes.use-latest-versions' version '0.2.18'
id 'com.github.ben-manes.versions' version '0.52.0'
id 'maven-publish'
id "net.researchgate.release" version "3.1.0"
}
evaluationDependsOnChildren()
allprojects {
group = 'com.raynigon.unit-api'
}
release {
preTagCommitMessage = "[Release] Version:"
tagCommitMessage = "[Release] Version:"
newVersionCommitMessage = "[Release] Update Version:"
tagTemplate = 'v${version}'
buildTasks = ['publish']
git {
requireBranch.set("release")
}
}
def updateMkdocsConfig = tasks.register("updateMkdocsConfig") {
doFirst {
def cfg = project.file(project.file('mkdocs.yml'))
cfg.text = cfg.text.replaceAll(/(?m)latest_version:.*/, "latest_version: ${project.version}")
}
}
tasks.named("afterReleaseBuild").configure {
dependsOn(
subprojects.collect { it.tasks.named("publish") },
updateMkdocsConfig
)
}