-
-
Notifications
You must be signed in to change notification settings - Fork 50
/
build.gradle
62 lines (52 loc) · 1.71 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
import dependencies.Deps
import dependencies.Versions
apply plugin: 'org.jetbrains.dokka'
buildscript {
ext.versionName = Versions.versionName
ext.groupName = 'com.chibatching.kotpref'
repositories {
jcenter()
google()
}
dependencies {
classpath Deps.androidGradlePlugin
classpath Deps.Kotlin.gradlePlugin
classpath Deps.dokkaGradlePlugin
}
}
repositories {
jcenter()
google()
}
subprojects {
repositories {
jcenter()
google()
}
}
wrapper {
distributionType = Wrapper.DistributionType.ALL
}
task replaceVersionInReadme {
doLast {
ant.replaceregexp(match: 'com\\.chibatching\\.kotpref:(.+):([0-9\\.]+)', replace: "com.chibatching.kotpref:\\1:${Versions.versionName}", flags: 'g') {
fileset(dir: project.projectDir, includes: 'README.md')
}
ant.replaceregexp(match: 'androidx\\.lifecycle:lifecycle-livedata:([0-9\\.]+)', replace: "androidx.lifecycle:lifecycle-livedata:${Versions.AndroidX.liveData}", flags: 'g') {
fileset(dir: project.projectDir, includes: 'README.md')
}
ant.replaceregexp(match: 'com\\.google\\.code\\.gson:gson:([0-9\\.]+)', replace: "com.google.code.gson:gson:${Versions.gson}", flags: 'g') {
fileset(dir: project.projectDir, includes: 'README.md')
}
ant.replaceregexp(match: 'kotlin-([0-9\\.]+)-blue\\.svg', replace: "kotlin-${Versions.kotlin}-blue.svg", flags: 'g') {
fileset(dir: project.projectDir, includes: 'README.md')
}
}
}
tasks.named("dokkaHtmlMultiModule") {
outputDirectory.set(file("docs/api"))
dependsOn cleanApiDocs
}
task cleanApiDocs(type: Delete) {
delete 'docs/api'
}