forked from airbnb/paris
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
66 lines (56 loc) · 2.05 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
apply plugin: "com.github.ben-manes.versions"
buildscript {
ext {
ANDROID_PLUGIN_VERSION = '3.3.0'
BUTTERKNIFE_VERSION = '10.0.0'
KOTLIN_VERSION = '1.3.0'
VERSIONS_VERSION = '0.20.0'
}
repositories {
google()
jcenter()
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
dependencies {
classpath "com.android.tools.build:gradle:$ANDROID_PLUGIN_VERSION"
classpath "com.jakewharton:butterknife-gradle-plugin:$BUTTERKNIFE_VERSION"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$KOTLIN_VERSION"
classpath "com.github.ben-manes:gradle-versions-plugin:$VERSIONS_VERSION"
}
}
allprojects {
repositories {
google()
jcenter()
}
configurations.all {
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jre7'
resolutionStrategy {
// fail eagerly on version conflict (includes transitive dependencies)
// e.g. multiple different versions of the same dependency (group and name are equal)
failOnVersionConflict()
force deps.kotlin, deps.kotlinReflect, deps.mockitoCore, 'com.google.errorprone:error_prone_annotations:2.0.19',
'com.google.guava:guava:22.0', 'org.apache.httpcomponents:httpcore:4.2.5', 'org.codehaus.plexus:plexus-utils:1.5.15',
"org.jetbrains.kotlin:kotlin-stdlib:$KOTLIN_VERSION"
}
}
}
subprojects { project ->
apply from: "$rootDir/blessedDeps.gradle"
// TODO Same for maven upload script?
}
task clean(type: Delete) {
delete rootProject.buildDir
}
dependencyUpdates.resolutionStrategy {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm', 'preview'].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
}
if (rejected) {
selection.reject('Release candidate')
}
}
}
}