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
96 lines (85 loc) · 3.68 KB
/
build.gradle
File metadata and controls
96 lines (85 loc) · 3.68 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
96
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.50' // https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md
ext.coroutines_version = '1.3.1' // https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md
ext.versions = [
'minSdk': 21,
'compileSdk': 28,
'targetSdk': 28,
// https://developer.android.com/jetpack/androidx/releases
'core': '1.1.0',
'annotation': '1.1.0',
'lifecycle': '2.1.0',
'paging': '2.1.0',
'room': '2.2.1',
'butterknife': '10.2.0', // github.com/JakeWharton/butterknife/blob/master/CHANGELOG.md
'crashlytics': '2.10.1', // docs.fabric.io/android/changelog.html
'dagger': '2.25.2', // github.com/google/dagger/releases
'gson': '2.8.6', // github.com/google/gson/blob/master/CHANGELOG.md
'okhttp': '4.2.2', // 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.1.0', // github.com/UweTrottmann/thetvdb-java/blob/master/CHANGELOG.md
'tmdb': '2.1.1', // github.com/UweTrottmann/tmdb-java/blob/master/CHANGELOG.md
'trakt': '6.3.0', // github.com/UweTrottmann/trakt-java/blob/master/CHANGELOG.md
'truth': '1.0', // github.com/google/truth/releases
// version 21xxxyy -> min SDK 21, release xxx, build yy
'code': 2105203,
'name': '52-beta3',
]
// 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.5.2' // libraries, SeriesGuide
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.ben-manes:gradle-versions-plugin:0.25.0'
classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:2.0.1' // SeriesGuide
// https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin
classpath 'io.fabric.tools:gradle:1.31.2' // SeriesGuide
classpath 'io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.21.1' // 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', '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()
maven { url 'https://maven.fabric.io/public' }
}
}
task clean(type: Delete) {
group "build"
delete rootProject.buildDir
}
wrapper {
//noinspection UnnecessaryQualifiedReference
distributionType = Wrapper.DistributionType.ALL
}