@@ -25,7 +25,7 @@ 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 ) {
28
+ def getVersionOrDefault (String flagName , String defaultVersion ) {
29
29
rootProject. hasProperty(flagName) ? rootProject. properties[flagName] : defaultVersion
30
30
}
31
31
@@ -37,9 +37,7 @@ buildscript {
37
37
// kotlin version is dictated by rootProject extension or property in gradle.properties
38
38
ext. asyncStorageKtVersion = rootProject. ext. has(' kotlinVersion' )
39
39
? rootProject. ext[' kotlinVersion' ]
40
- : rootProject. hasProperty(' AsyncStorage_kotlinVersion' )
41
- ? rootProject. properties[' AsyncStorage_kotlinVersion' ]
42
- : ' 1.5.31'
40
+ : getVersionOrDefault(' AsyncStorage_kotlinVersion' , ' 1.5.31' )
43
41
44
42
repositories {
45
43
google()
@@ -117,13 +115,13 @@ repositories {
117
115
dependencies {
118
116
119
117
if (useNextStorage) {
120
- def room_version = getVersionOfDefault (' AsyncStorage_next_roomVersion' , ' 2.3.0' )
118
+ def room_version = getVersionOrDefault (' AsyncStorage_next_roomVersion' , ' 2.3.0' )
121
119
def coroutines_version = " 1.5.2"
122
120
def coroutinesTest_version = " 1.5.2"
123
121
// if we don't provide explicit dependency on reflection, kotlin plugin
124
122
// would add one automatically, probably a version that is not compatible with
125
123
// used kotlin
126
- def kotlinReflect_version = " 1.5.31 "
124
+ def kotlinReflect_version = project . ext . asyncStorageKtVersion
127
125
def junit_version = " 4.12"
128
126
def robolectric_version = " 4.5.1"
129
127
def truth_version = " 1.1.2"
0 commit comments