-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle.kts
39 lines (36 loc) · 957 Bytes
/
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
val domaVersion = "3.3.0"
fun updateVersion() {
// Gradle
ant.withGroovyBuilder {
"replaceregexp"(
"match" to """(["']org.seasar.doma:doma-(core|kotlin|processor|slf4j|template)?:)[^"']*(["'])""",
"replace" to "\\1${domaVersion}\\3",
"encoding" to "UTF-8",
"flags" to "g"
) {
"fileset"("dir" to ".") {
"include"("name" to "docs/**/*.rst")
}
}
}
// Maven
ant.withGroovyBuilder {
"replaceregexp"(
"match" to """(<doma.version>).*(</doma.version>)""",
"replace" to "\\1${domaVersion}\\2",
"encoding" to "UTF-8",
"flags" to "g"
) {
"fileset"("dir" to ".") {
"include"("name" to "docs/**/*.rst")
}
}
}
}
tasks {
register("updateVersion") {
doLast {
updateVersion()
}
}
}