File tree Expand file tree Collapse file tree 4 files changed +14
-16
lines changed
src/commonTest/kotlin/dev/gitlive/firebase/auth Expand file tree Collapse file tree 4 files changed +14
-16
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,6 @@ subprojects {
149
149
" androidAndroidTestImplementation" (" org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.6" )
150
150
" androidAndroidTestImplementation" (" androidx.test.ext:junit:1.1.1" )
151
151
" androidAndroidTestImplementation" (" androidx.test:runner:1.1.0" )
152
- " androidAndroidTestUtil" (" com.android.support.test:orchestrator:1.0.2" )
153
152
}
154
153
}
155
154
Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ android {
33
33
}
34
34
packagingOptions {
35
35
pickFirst(" META-INF/kotlinx-serialization-runtime.kotlin_module" )
36
+ pickFirst(" META-INF/AL2.0" )
37
+ pickFirst(" META-INF/LGPL2.1" )
36
38
}
37
39
}
38
40
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ android {
12
12
minSdkVersion(property(" minSdkVersion" ) as Int )
13
13
targetSdkVersion(property(" targetSdkVersion" ) as Int )
14
14
testInstrumentationRunner = " androidx.test.runner.AndroidJUnitRunner"
15
- testInstrumentationRunnerArguments[" clearPackageData" ] = " true"
16
15
}
17
16
sourceSets {
18
17
getByName(" main" ) {
@@ -21,7 +20,6 @@ android {
21
20
getByName(" androidTest" ).java.srcDir(file(" src/androidAndroidTest/kotlin" ))
22
21
}
23
22
testOptions {
24
- execution = " ANDROID_TEST_ORCHESTRATOR"
25
23
unitTests.apply {
26
24
isIncludeAndroidResources = true
27
25
}
Original file line number Diff line number Diff line change @@ -6,10 +6,7 @@ package dev.gitlive.firebase.auth
6
6
7
7
import dev.gitlive.firebase.*
8
8
import kotlin.random.Random
9
- import kotlin.test.BeforeTest
10
- import kotlin.test.Test
11
- import kotlin.test.assertEquals
12
- import kotlin.test.assertNotEquals
9
+ import kotlin.test.*
13
10
14
11
expect val context: Any
15
12
expect fun runTest (test : suspend () -> Unit )
@@ -18,15 +15,17 @@ class FirebaseAuthTest {
18
15
19
16
@BeforeTest
20
17
fun initializeFirebase () {
21
- Firebase .initialize(
22
- context,
23
- FirebaseOptions (
24
- applicationId = " 1:846484016111:ios:dd1f6688bad7af768c841a" ,
25
- apiKey = " AIzaSyCK87dcMFhzCz_kJVs2cT2AVlqOTLuyWV0" ,
26
- databaseUrl = " https://fir-kotlin-sdk.firebaseio.com" ,
27
- storageBucket = " fir-kotlin-sdk.appspot.com" ,
28
- projectId = " fir-kotlin-sdk"
29
- )
18
+ Firebase
19
+ .takeIf { Firebase .apps(context).isEmpty() }
20
+ ?.initialize(
21
+ context,
22
+ FirebaseOptions (
23
+ applicationId = " 1:846484016111:ios:dd1f6688bad7af768c841a" ,
24
+ apiKey = " AIzaSyCK87dcMFhzCz_kJVs2cT2AVlqOTLuyWV0" ,
25
+ databaseUrl = " https://fir-kotlin-sdk.firebaseio.com" ,
26
+ storageBucket = " fir-kotlin-sdk.appspot.com" ,
27
+ projectId = " fir-kotlin-sdk"
28
+ )
30
29
)
31
30
}
32
31
You can’t perform that action at this time.
0 commit comments