@@ -25,6 +25,10 @@ def getFlagOrDefault(flagName, defaultValue) {
25
25
rootProject. hasProperty(flagName) ? rootProject. properties[flagName] == " true" : defaultValue
26
26
}
27
27
28
+ def getVersionOfDefault (String flagName , String defaultVersion ) {
29
+ rootProject. hasProperty(flagName) ? rootProject. properties[flagName] : defaultVersion
30
+ }
31
+
28
32
configurations {
29
33
compileClasspath
30
34
}
@@ -35,7 +39,7 @@ buildscript {
35
39
? rootProject. ext[' kotlinVersion' ]
36
40
: rootProject. hasProperty(' AsyncStorage_kotlinVersion' )
37
41
? rootProject. properties[' AsyncStorage_kotlinVersion' ]
38
- : ' 1.4.21 '
42
+ : ' 1.5.31 '
39
43
40
44
repositories {
41
45
google()
@@ -90,6 +94,13 @@ android {
90
94
testOptions {
91
95
unitTests. returnDefaultValues = true
92
96
}
97
+ compileOptions {
98
+ sourceCompatibility JavaVersion . VERSION_1_8
99
+ targetCompatibility JavaVersion . VERSION_1_8
100
+ }
101
+ kotlinOptions {
102
+ jvmTarget = " 1.8"
103
+ }
93
104
}
94
105
}
95
106
@@ -106,16 +117,22 @@ repositories {
106
117
dependencies {
107
118
108
119
if (useNextStorage) {
109
- def room_version = " 2.2.6"
110
- def coroutines_version = " 1.4.2"
120
+ def room_version = getVersionOfDefault(' AsyncStorage_next_roomVersion' , ' 2.3.0' )
121
+ def coroutines_version = " 1.5.2"
122
+ def coroutinesTest_version = " 1.5.2"
123
+ // if we don't provide explicit dependency on reflection, kotlin plugin
124
+ // would add one automatically, probably a version that is not compatible with
125
+ // used kotlin
126
+ def kotlinReflect_version = " 1.5.31"
111
127
def junit_version = " 4.12"
112
128
def robolectric_version = " 4.5.1"
113
129
def truth_version = " 1.1.2"
114
130
def androidxtest_version = " 1.1.0"
115
- def coroutinesTest_version = " 1.4.2"
116
131
117
132
implementation " androidx.room:room-runtime:$room_version "
118
133
implementation " androidx.room:room-ktx:$room_version "
134
+ implementation " org.jetbrains.kotlin:kotlin-reflect:$kotlinReflect_version "
135
+
119
136
implementation " org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version "
120
137
kapt " androidx.room:room-compiler:$room_version "
121
138
0 commit comments