-
Notifications
You must be signed in to change notification settings - Fork 0
/
shared.gradle
110 lines (87 loc) · 3.46 KB
/
shared.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
98
99
100
101
102
103
104
105
106
107
108
apply plugin: 'kotlin-android'
android {
compileSdkVersion Versions.compileSdk
defaultConfig {
minSdkVersion Versions.minSdk
targetSdkVersion Versions.targetSdk
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
debug {
debuggable = true
}
release {
debuggable = false
minifyEnabled true
proguardFiles 'proguard-rules.pro', getDefaultProguardFile('proguard-android.txt')
}
}
compileOptions {
// Flag to enable support for the new language APIs
coreLibraryDesugaringEnabled true
// Sets Java compatibility to Java 8
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += [
"-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-Xuse-experimental=androidx.paging.ExperimentalPagingApi",
"-Xuse-experimental=kotlinx.coroutines.FlowPreview",
"-Xuse-experimental=kotlin.time.ExperimentalTime",
"-Xuse-experimental=kotlin.ExperimentalStdlibApi",
]
}
lintOptions {
disable("MissingClass")
abortOnError true
}
testOptions {
execution 'ANDROIDX_TEST_ORCHESTRATOR'
animationsDisabled = true
unitTests.all {
useJUnitPlatform()
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE.md'
exclude 'META-INF/LICENSE-notice.md'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/AL2.0'
exclude 'META-INF/LGPL2.1'
exclude("META-INF/*.kotlin_module")
}
sourceSets.all { sourceSet ->
sourceSet.java.srcDirs += "src/${sourceSet.getName()}/kotlin"
}
dependencies {
testImplementation project(":common-test")
implementation "org.jetbrains.kotlin:kotlin-stdlib:${Versions.kotlin}"
//coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.coroutines}"
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:${Versions.coroutines}"
//junit
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${Versions.junit5}"
testImplementation "org.junit.jupiter:junit-jupiter-params:${Versions.junit5}"
testImplementation "androidx.test:core:${Versions.runner}"
//junit instrumented
androidTestImplementation "androidx.test:core:${Versions.runner}"
androidTestImplementation("androidx.test:runner:${Versions.runner}")
androidTestImplementation "androidx.test:rules:${Versions.runner}"
androidTestImplementation "androidx.test.ext:junit:${Versions.androidJunit}"
androidTestUtil "androidx.test:orchestrator:${Versions.runner}"
androidTestImplementation "androidx.arch.core:core-testing:${Versions.archCoreTesting}"
//Having full java.time.* below api 26
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:${Versions.jdkDesugar}"
//solving errors in tests
testImplementation "com.google.code.gson:gson:${Versions.gson}"
}
}