File tree Expand file tree Collapse file tree 3 files changed +35
-1
lines changed
src/commonTest/kotlin/dev/teamhub/firebase Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ kotlin {
33
33
moduleKind = " commonjs"
34
34
}
35
35
}
36
+ nodejs()
37
+ browser()
36
38
}
37
39
// js("reactnative") {
38
40
// val main by compilations.getting {
@@ -61,6 +63,12 @@ kotlin {
61
63
implementation(project(" :firebase-common" ))
62
64
}
63
65
}
66
+ val commonTest by getting {
67
+ dependencies {
68
+ implementation(kotlin(" test-common" ))
69
+ implementation(kotlin(" test-annotations-common" ))
70
+ }
71
+ }
64
72
val androidMain by getting {
65
73
dependencies {
66
74
api(" com.google.firebase:firebase-common:19.2.0" )
@@ -69,7 +77,17 @@ kotlin {
69
77
val jvmMain by getting {
70
78
kotlin.srcDir(" src/androidMain/kotlin" )
71
79
}
72
- // val iosMain by creating
80
+ val jvmTest by getting {
81
+ dependencies {
82
+ implementation(kotlin(" test-junit" ))
83
+ }
84
+ }
85
+ val jsTest by getting {
86
+ dependencies {
87
+ implementation(kotlin(" test-js" ))
88
+ }
89
+ }
90
+ // val iosMain by creating
73
91
74
92
configure(listOf (iosArm64, iosX64)) {
75
93
compilations.getByName(" main" ) {
Original file line number Diff line number Diff line change
1
+ package dev.teamhub.firebase
2
+
3
+ import kotlin.test.Test
4
+
5
+ class FirebaseAppTest {
6
+ @Test
7
+ fun testInitialize () {
8
+ Firebase .initialize()
9
+ }
10
+ }
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ kotlin {
33
33
moduleKind = " commonjs"
34
34
}
35
35
}
36
+ nodejs()
36
37
}
37
38
android {
38
39
publishLibraryVariants(" release" , " debug" )
@@ -80,6 +81,11 @@ kotlin {
80
81
api(" org.jetbrains.kotlinx:kotlinx-serialization-runtime-js:0.20.0" )
81
82
}
82
83
}
84
+ val jsTest by getting {
85
+ dependencies {
86
+ implementation(kotlin(" test-js" ))
87
+ }
88
+ }
83
89
val jvmMain by getting {
84
90
dependencies {
85
91
api(" org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.20.0" )
You can’t perform that action at this time.
0 commit comments