/
build.gradle
97 lines (86 loc) · 3.85 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
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
96
97
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.72' // https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md
ext.coroutines_version = '1.3.7' // https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md
ext.versions = [
'minSdk': 21,
'compileSdk': 29,
'targetSdk': 29,
// https://developer.android.com/jetpack/androidx/releases
'core': '1.3.0',
'annotation': '1.1.0',
'lifecycle': '2.2.0',
'paging': '2.1.2',
'room': '2.2.5',
'butterknife': '10.2.1', // https://github.com/JakeWharton/butterknife/blob/master/CHANGELOG.md
'crashlytics': '17.0.1', // https://firebase.google.com/support/release-notes/android
'dagger': '2.28', // https://github.com/google/dagger/releases
'gson': '2.8.6', // https://github.com/google/gson/blob/master/CHANGELOG.md
'okhttp': '4.7.2', // https://github.com/square/okhttp/blob/master/CHANGELOG.md
'retrofit': '2.9.0', // https://github.com/square/retrofit/blob/master/CHANGELOG.md
'timber': '4.7.1', // https://github.com/JakeWharton/timber/blob/master/CHANGELOG.md
'androidUtils': '2.3.1', // https://github.com/UweTrottmann/AndroidUtils/blob/master/RELEASE_NOTES.md
'thetvdb': '2.3.0', // https://github.com/UweTrottmann/thetvdb-java/blob/master/CHANGELOG.md
'tmdb': '2.2.0', // https://github.com/UweTrottmann/tmdb-java/blob/master/CHANGELOG.md
'trakt': '6.5.0', // https://github.com/UweTrottmann/trakt-java/blob/master/CHANGELOG.md
'truth': '1.0.1', // https://github.com/google/truth/releases
// version 21xxxyy -> min SDK 21, release xxx, build yy
'code': 2105503,
'name': '55-beta4',
]
// 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()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.0' // libraries, SeriesGuide
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.ben-manes:gradle-versions-plugin:0.28.0'
classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:2.0.1' // SeriesGuide
classpath 'io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.21.2' // api
// Firebase Crashlytics
// https://firebase.google.com/support/release-notes/android
classpath 'com.google.gms:google-services:4.3.3'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.1.1'
}
}
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', 'eap'].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
}
if (rejected) {
selection.reject('Preview release')
}
}
}
}
allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
jcenter()
}
}
task clean(type: Delete) {
group "build"
delete rootProject.buildDir
}
wrapper {
//noinspection UnnecessaryQualifiedReference
distributionType = Wrapper.DistributionType.ALL
}