-
Notifications
You must be signed in to change notification settings - Fork 0
/
android-library.gradle
46 lines (37 loc) · 1.36 KB
/
android-library.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
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 29
defaultConfig {
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
// Fixes cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6
kotlinOptions {
jvmTarget = "1.8"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
testOptions {
// http://tools.android.com/tech-docs/unit-testing-support#TOC-Method-...-not-mocked.-
// CountingIdlingResource uses android.text.TextUtils and android.os.SystemClock, the stub version
// of these throws an exception and fails unit tests in MainFragmentViewModelTest. The following
// flag overrides these methods to return default values instead.
unitTests.returnDefaultValues = true
unitTests.includeAndroidResources = true
}
}
tasks.withType(Test) {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
}