Skip to content

Commit dbae36c

Browse files
authored
Merge pull request #25 from jarroyoesp/feature/firebase
ComposeApp: Add Firebase feature to Android, Desktop & iOS
2 parents 451d935 + 087781c commit dbae36c

File tree

41 files changed

+2687
-1574
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2687
-1574
lines changed

.github/workflows/check_and_deploy.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ jobs:
4242
- name: Copy CI gradle.properties
4343
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
4444

45+
- name: Restore google-services.json
46+
run: |
47+
mkdir -p app
48+
echo "${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}" | base64 --decode > app/google-services.json
49+
4550
- name: Build
4651
uses: gradle/gradle-build-action@v2
4752
with:

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ jobs:
3434
- name: Copy CI gradle.properties
3535
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
3636

37+
- name: Restore google-services.json
38+
run: |
39+
mkdir -p app
40+
echo "${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}" | base64 --decode > app/google-services.json
41+
3742
## Actual task
3843
- name: Build
3944
uses: gradle/gradle-build-action@v2
@@ -60,6 +65,11 @@ jobs:
6065
- name: Copy CI gradle.properties
6166
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
6267

68+
- name: Restore google-services.json
69+
run: |
70+
mkdir -p app
71+
echo "${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}" | base64 --decode > app/google-services.json
72+
6373
- name: Build
6474
uses: gradle/gradle-build-action@v2
6575
with:

.idea/compiler.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![CI-MASTER](https://github.com/jarroyoesp/ComposeMultiplatformApp/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/jarroyoesp/ComposeMultiplatformApp/actions/workflows/ci.yml)
22
[![Latest release](https://img.shields.io/github/v/release/JetBrains/compose-multiplatform?color=blue&label=Compose%20multiplatform)](https://github.com/JetBrains/compose-multiplatform/releases/tag/v1.7.3)
3-
![Kotlin Version](https://img.shields.io/badge/Kotlin-2.1.0-blue?logo=kotlin&logoColor=white)
3+
![Kotlin Version](https://img.shields.io/badge/Kotlin-2.1.20-blue?logo=kotlin&logoColor=white)
44
<div align="center">
55
<img alt="Compose multiplatform charts" src="./screenshots/compose_multiplatform_logo.png"/>
66
<h1>🚀 Example project to show SpaceX data built with Kotlin Multiplatform and Compose UI Multiplatform</h1>

app/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ dependencies {
3737
implementation(libs.androidx.activity.compose)
3838
implementation(libs.androidx.compose.ui)
3939
implementation(libs.androidx.compose.material3)
40+
implementation(libs.gitlive.firebase.firestore)
4041
implementation(libs.koin.android)
4142
testImplementation(libs.junit)
4243
androidTestImplementation(libs.junit)
4344
androidTestImplementation(libs.androidx.test.espresso.core)
4445
androidTestImplementation(libs.androidx.compose.ui.test.junit4)
46+
androidTestImplementation(libs.gitlive.firebase.firestore)
4547
debugImplementation(libs.androidx.compose.tooling)
4648
debugImplementation(libs.androidx.compose.ui.test.manifest)
4749

app/src/main/java/com/jarroyo/composeapp/ComposeApp.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.jarroyo.composeapp
22

33
import android.app.Application
44
import android.content.Context
5+
import com.google.firebase.FirebaseApp
56
import com.jarroyo.feature.home.shared.di.initKoin
67
import dagger.hilt.android.HiltAndroidApp
78
import org.koin.dsl.module
@@ -10,6 +11,7 @@ import org.koin.dsl.module
1011
class ComposeApp : Application() {
1112
override fun onCreate() {
1213
super.onCreate()
14+
FirebaseApp.initializeApp(this)
1315
initKoin(
1416
listOf(
1517
module {

0 commit comments

Comments
 (0)