forked from Evernote/android-state
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
70 lines (61 loc) · 2.12 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
buildscript {
ext.kotlinVersion = '1.2.71'
ext.agpVersion = '3.2.0'
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:$agpVersion"
classpath 'com.github.ben-manes:gradle-versions-plugin:0.17.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'de.mobilej.unmock:UnMockPlugin:0.6.5'
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked"
}
}
ext {
compileSdkVersion = 28
targetSdkVersion = compileSdkVersion
minSdkVersion = 14
buildToolsVersion = '28.0.3'
junitVersion = '4.12'
assertjVersion = '3.6.2'
lintVersion = "26" + agpVersion.substring(1)
kotlinMockitoVersion = '1.5.0'
unmockVersion = 'org.robolectric:android-all:4.3_r2-robolectric-0'
testRuleVersion = '1.0.1'
espressoVersion = '3.0.1'
assertjAndroidVersion = '1.1.1'
}
task wrapper(type: Wrapper) {
gradleVersion = '4.10.2'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
}
subprojects { subproject ->
// avoids conflicts in test app
configurations.all {
resolutionStrategy.force "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
// Replace deprecated Kotlin JRE dependencies with JDK dependencies
resolutionStrategy.dependencySubstitution {
all { DependencySubstitution dependency ->
if (dependency.requested instanceof ModuleComponentSelector && dependency.requested.group == 'org.jetbrains.kotlin') {
if (dependency.requested.module == 'kotlin-stdlib-jre7') {
dependency.useTarget "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
}
if (dependency.requested.module == 'kotlin-stdlib-jre8') {
dependency.useTarget "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
}
}
}
}
}
}