1
+ plugins {
2
+ id ' com.android.library'
3
+ id ' kotlin-android'
4
+ id ' org.jetbrains.kotlin.plugin.serialization'
5
+ id ' de.mannodermaus.android-junit5'
6
+ }
7
+
8
+ android {
9
+ compileSdkVersion 33
10
+
11
+ defaultConfig {
12
+ // Required when setting minSdkVersion to 20 or lower
13
+ multiDexEnabled true
14
+
15
+ minSdkVersion 16
16
+ targetSdkVersion 33
17
+ versionCode VERSION_CODE . toInteger()
18
+ versionName VERSION_NAME
19
+
20
+ testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
21
+ consumerProguardFiles " consumer-rules.pro"
22
+
23
+ buildConfigField(" int" , " SEGMENT_VERSION_CODE" , " ${ versionCode} " )
24
+ buildConfigField(" String" , " SEGMENT_VERSION_NAME" , " \" ${ versionName} \" " )
25
+ }
26
+
27
+ buildTypes {
28
+ release {
29
+ minifyEnabled false
30
+ proguardFiles getDefaultProguardFile(' proguard-android-optimize.txt' ), ' proguard-rules.pro'
31
+ }
32
+ }
33
+ compileOptions {
34
+ sourceCompatibility JavaVersion . VERSION_1_8
35
+ targetCompatibility JavaVersion . VERSION_1_8
36
+ }
37
+ kotlinOptions {
38
+ jvmTarget = ' 1.8'
39
+ }
40
+ testOptions {
41
+ unitTests {
42
+ includeAndroidResources = true
43
+ }
44
+ }
45
+
46
+ }
47
+
48
+ dependencies {
49
+ // MAIN DEPS
50
+ api project(' :core' )
51
+ api ' com.segment:sovran-kotlin:1.2.2'
52
+ api " org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1"
53
+ implementation ' org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1'
54
+ implementation ' org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1'
55
+ implementation ' androidx.lifecycle:lifecycle-process:2.6.1'
56
+ implementation ' androidx.lifecycle:lifecycle-common-java8:2.6.1'
57
+
58
+
59
+ // TESTING
60
+ testImplementation ' org.junit.jupiter:junit-jupiter:5.8.2'
61
+ testImplementation ' io.mockk:mockk:1.12.2'
62
+ testImplementation ' org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.1'
63
+ androidTestImplementation ' androidx.test.ext:junit:1.1.5'
64
+ androidTestImplementation ' androidx.test.espresso:espresso-core:3.5.1'
65
+
66
+ // Add JUnit5 dependencies.
67
+ testRuntimeOnly ' org.junit.jupiter:junit-jupiter-engine:5.8.2'
68
+ testImplementation ' org.junit.jupiter:junit-jupiter-params:5.8.2'
69
+
70
+ // Add JUnit4 legacy dependencies.
71
+ testImplementation ' junit:junit:4.13.2'
72
+ testRuntimeOnly ' org.junit.vintage:junit-vintage-engine:5.8.2'
73
+
74
+ // Add Roboelectric dependencies.
75
+ testImplementation ' org.robolectric:robolectric:4.7.3'
76
+ testImplementation ' androidx.test:core:1.5.0'
77
+ }
78
+
79
+ apply from : rootProject. file(' gradle/artifacts-android.gradle' )
80
+ apply from : rootProject. file(' gradle/mvn-publish.gradle' )
81
+ apply from : rootProject. file(' gradle/codecov.gradle' )
0 commit comments