-
Notifications
You must be signed in to change notification settings - Fork 599
/
build.gradle
89 lines (72 loc) · 2.76 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
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.getkeepsafe.dexcount'
apply plugin: 'kotlin-kapt'
android {
useLibrary 'org.apache.http.legacy'
compileSdkVersion target_sdk
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
minSdkVersion min_sdk_rx
targetSdkVersion target_sdk
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
abortOnError false
}
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
exclude 'META-INF/rxjava.properties'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
testOptions {
unitTests {
includeAndroidResources true
}
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation project("${dbflow_project_prefix}lib")
implementation project("${dbflow_project_prefix}sqlcipher")
implementation project("${dbflow_project_prefix}reactive-streams")
implementation project("${dbflow_project_prefix}contentprovider")
implementation project("${dbflow_project_prefix}coroutines")
implementation project("${dbflow_project_prefix}paging")
implementation project("${dbflow_project_prefix}livedata")
kaptAndroidTest project("${dbflow_project_prefix}processor")
androidTestImplementation deps.javax_annotation
androidTestImplementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.0.0-RC3") {
exclude group: "org.jetbrains.kotlin"
}
androidTestImplementation "org.mockito:mockito-android:2.23.0"
androidTestImplementation deps.junit
androidTestImplementation "androidx.test:core:1.3.0"
androidTestImplementation "androidx.test:runner:1.3.0"
androidTestImplementation "androidx.test:rules:1.3.0"
androidTestImplementation "androidx.arch.core:core-testing:2.1.0"
}
android.applicationVariants.all { variant ->
String taskName = "copy${variant.name.capitalize()}ResDirectoryToClasses"
task(taskName, type: Copy) {
from "${projectDir}/src/test/res"
into "${buildDir}/intermediates/classes/test/${variant.buildType.name}/res"
from "${projectDir}/src/test/assets"
into "${buildDir}/intermediates/classes/test/${variant.buildType.name}/assets"
}
project.getTasksByName("generate${variant.name.capitalize()}Resources", false)[0].dependsOn(taskName)
}
dexcount {
includeClasses = true
orderByMethodCount = true
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions.freeCompilerArgs += ["-XXLanguage:+InlineClasses"]
}