forked from chibatching/Kotpref
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
49 lines (43 loc) · 1.83 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
import dependencies.Deps
import dependencies.Versions
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.versionName = Versions.versionName
ext.groupName = 'com.chibatching.kotpref'
repositories {
jcenter()
google()
}
dependencies {
classpath Deps.androidGradlePlugin
classpath Deps.Kotlin.gradlePlugin
classpath Deps.bintrayGradlePlugin
classpath Deps.androidMavenGradlePlugin
classpath Deps.dokkaAndroidGradlePlugin
}
}
allprojects {
repositories {
jcenter()
google()
}
}
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.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: 'org\\.jetbrains\\.kotlin:kotlin-reflect:([0-9\\.]+)', replace: "org.jetbrains.kotlin:kotlin-reflect:${Versions.kotlin}", 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')
}
}
}