-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
49 lines (43 loc) · 1.17 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
plugins {
id "com.github.ben-manes.versions" version "0.51.0"
id "build-dashboard"
id 'idea'
}
allprojects {
group = 'io.github.stewartbryson'
repositories {
mavenCentral()
gradlePluginPortal()
}
}
if (hasProperty('buildScan')) {
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
}
}
import org.apache.tools.ant.filters.ReplaceTokens
tasks.register('copyReadme', Copy) {
group 'documentation'
description 'Update README.md file with current version.'
from('src/markdown') {
include 'README.md'
filter(ReplaceTokens, tokens: [version: version])
}
into '.'
}
tasks.register('copyExamples', Copy) {
group 'documentation'
description 'Token replacement of current version in examples.'
from('src/examples') {
include '*/build.gradle'
filter(ReplaceTokens, tokens: [version: version])
}
into 'examples'
mustRunAfter copyReadme
}
tasks.register('examples') {
group 'documentation'
description 'Update README and example build.gradle files with current version.'
dependsOn copyReadme, copyExamples
}