forked from UweTrottmann/SeriesGuide
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
95 lines (84 loc) · 3.67 KB
/
Copy pathbuild.gradle
File metadata and controls
95 lines (84 loc) · 3.67 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.11' // https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md
ext.coroutines_version = '1.0.1' // https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md
ext.versions = [
'minSdk': 15,
'compileSdk': 28,
'targetSdk': 26,
// https://developer.android.com/jetpack/docs/release-notes
'annotation': '1.0.1',
'lifecycle': '2.0.0',
'paging': '2.0.0',
'room': '2.0.0',
'butterknife': '9.0.0-rc2', // github.com/JakeWharton/butterknife/blob/master/CHANGELOG.md
'crashlytics': '2.9.7', // docs.fabric.io/android/changelog.html
'dagger': '2.19', // github.com/google/dagger/releases
'gson': '2.8.5', // github.com/google/gson/blob/master/CHANGELOG.md
'okhttp': '3.12.0', // github.com/square/okhttp/blob/master/CHANGELOG.md
'timber': '4.7.1', // github.com/JakeWharton/timber/blob/master/CHANGELOG.md
'androidUtils': '2.3.1', // github.com/UweTrottmann/AndroidUtils/blob/master/RELEASE_NOTES.md
'thetvdb': '2.0.0', // github.com/UweTrottmann/thetvdb-java/blob/master/CHANGELOG.md
'tmdb': '1.10.1', // github.com/UweTrottmann/tmdb-java/blob/master/CHANGELOG.md
'trakt': '6.0.0', // github.com/UweTrottmann/trakt-java/blob/master/CHANGELOG.md
'truth': '0.42', // github.com/google/truth/releases
'threetenABP': '1.1.1', // github.com/JakeWharton/ThreeTenABP/blob/master/CHANGELOG.md
// version 15xxxyy -> min SDK 15, release xxx, build yy
'code': 1503401,
'name': '46-beta2',
]
// load some properties that should not be part of version control
if (file('secret.properties').exists()) {
def properties = new Properties()
properties.load(new FileInputStream(file("secret.properties")))
properties.each { property ->
project.ext.set(property.key, property.value)
}
}
ext.isCiBuild = System.getenv('CI') == 'true'
repositories {
google()
mavenCentral()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1' // libraries, SeriesGuide
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.ben-manes:gradle-versions-plugin:0.20.0'
classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:2.0.0' // SeriesGuide
classpath 'io.fabric.tools:gradle:1.27.0' // SeriesGuide
//noinspection GradleDependency
classpath 'io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.10.0' // api
}
}
apply plugin: 'com.github.ben-manes.versions'
// reject preview releases for dependencyUpdates task
dependencyUpdates.resolutionStrategy = {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
boolean rejected = ['alpha', 'beta', 'rc'].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
}
if (rejected) {
selection.reject('Preview release')
}
}
}
}
allprojects {
repositories {
google()
mavenCentral()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
}
task clean(type: Delete) {
group "build"
delete rootProject.buildDir
}
wrapper {
//noinspection UnnecessaryQualifiedReference
distributionType = Wrapper.DistributionType.ALL
}