Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Running Test

on:
pull_request:
types:
- opened
branches:
- 'main'

jobs:
test:
name: Unit tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'

- name: Load Google Service file
env:
DATA: ${{ secrets.GOOGLE_SERVICES_JSON }}
run: echo $DATA | base64 -di > app/google-services.json

- name: Grand execute permissions to gradlew
run: chmod +x gradlew
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
.externalNativeBuild
.cxx
local.properties

# Firebase configuration (contains sensitive API keys)
app/google-services.json
9 changes: 0 additions & 9 deletions .idea/misc.xml

This file was deleted.

6 changes: 6 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ plugins {
id 'com.google.dagger.hilt.android'
id 'kotlin-parcelize'
id 'org.jetbrains.kotlin.plugin.serialization'
id 'com.google.gms.google-services'
id 'com.google.firebase.crashlytics'
}

android {
Expand Down Expand Up @@ -105,6 +107,10 @@ dependencies {
androidTestImplementation platform(libs.androidx.compose.bom.test)
androidTestImplementation libs.bundles.testing.compose
debugImplementation libs.bundles.testing.compose.debug

// Firebase
implementation libs.firebase.crashlytics
implementation libs.firebase.analytics
}

// Allow references to generated code
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
android:name=".infra.common.AbbayApplication"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.app.Application
import coil.ImageLoader
import coil.ImageLoaderFactory
import coil.decode.SvgDecoder
import com.google.firebase.FirebaseApp
import dagger.hilt.android.HiltAndroidApp

@HiltAndroidApp
Expand All @@ -12,6 +13,9 @@ class AbbayApplication : Application(), ImageLoaderFactory {
override fun onCreate() {
super.onCreate()

// Initialize Firebase
FirebaseApp.initializeApp(this)

loader = ImageLoader.Builder(this)
.components {
add(SvgDecoder.Factory())
Expand Down
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ plugins {
id("org.jetbrains.kotlin.android") version "1.9.0" apply false
id 'com.google.dagger.hilt.android' version '2.48' apply false
id 'org.jetbrains.kotlin.plugin.serialization' version '1.8.20' apply false
id 'com.google.gms.google-services' version '4.4.3' apply false
id 'com.google.firebase.crashlytics' version '3.0.6' apply false
}
9 changes: 9 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ androidx-test-junit = "1.2.1"
espresso-core = "3.6.1"
compose-bom-test = "2022.10.00"

# Firebase
firebase-crashlytics = "18.6.2"
firebase-analytics = "21.5.1"

[libraries]
# AndroidX Core
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "core-ktx" }
Expand Down Expand Up @@ -136,6 +140,10 @@ androidx-compose-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-te
androidx-compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
androidx-compose-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }

# Firebase
firebase-crashlytics = { group = "com.google.firebase", name = "firebase-crashlytics", version.ref = "firebase-crashlytics" }
firebase-analytics = { group = "com.google.firebase", name = "firebase-analytics", version.ref = "firebase-analytics" }

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
android-library = { id = "com.android.library", version.ref = "agp" }
Expand All @@ -145,6 +153,7 @@ kotlin-kapt = { id = "kotlin-kapt" }
kotlin-parcelize = { id = "kotlin-parcelize" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
firebase-crashlytics = { id = "com.google.firebase.crashlytics", version = "2.9.9" }

[bundles]
compose = [
Expand Down