diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index f8366f08..ce8989dc 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -38,8 +38,9 @@ jobs: run: | echo "GOOGLE_CLIENT_ID=\"$GOOGLE_CLIENT_ID\"" >> local.properties - - name: Build with Gradle - run: ./gradlew build --parallel + - name: Create google-services + run: | + echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json - name: Run test run: ./gradlew test --parallel diff --git a/.github/workflows/build_cache.yml b/.github/workflows/build_cache.yml index daa1faf6..078e991f 100644 --- a/.github/workflows/build_cache.yml +++ b/.github/workflows/build_cache.yml @@ -38,6 +38,10 @@ jobs: run: | echo "GOOGLE_CLIENT_ID=\"$GOOGLE_CLIENT_ID\"" >> local.properties + - name: Create google-services + run: | + echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json + - name: Build with Gradle run: ./gradlew build diff --git a/app/build.gradle.kts b/app/build.gradle.kts index a1274a66..c83a3794 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,5 +1,7 @@ plugins { id("convention.application") + alias(libs.plugins.firebase.services) + alias(libs.plugins.firebase.crashlytics) } android { @@ -50,4 +52,9 @@ dependencies { implementation(project(":core:domain")) implementation(project(":core:designsystem")) testImplementation(project(":core:testing")) + + //firebase + implementation(platform(libs.firebase.bom)) + implementation(libs.firebase.analytics) + implementation(libs.firebase.crashlytics) } diff --git a/build.gradle.kts b/build.gradle.kts index fd9ae5e9..613e129e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,4 +8,6 @@ plugins { alias(libs.plugins.hilt) apply false alias(libs.plugins.kotlin.serialization) apply false alias(libs.plugins.dependency.graph) apply true + alias(libs.plugins.firebase.services) apply false + alias(libs.plugins.firebase.crashlytics) apply false } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index bede1f2d..5d317054 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -64,6 +64,10 @@ coreTesting = "2.2.0" dependencyGraph = "0.8.0" +firebasePlugin = "4.3.15" +firebaseBom = "32.7.4" +firebaseCrashlytics = "2.9.9" + [libraries] android-gradlePlugin = { group = "com.android.tools.build", name = "gradle", version.ref = "androidGradlePlugin" } android-desugarJdkLibs = { group = "com.android.tools", name = "desugar_jdk_libs", version.ref = "androidDesugarJdkLibs" } @@ -166,6 +170,11 @@ junit = { group = "androidx.test.ext", name = "junit", version.ref = "junit" } material = { group = "com.google.android.material", name = "material", version.ref = "material" } androidx-material3-android = { group = "androidx.compose.material3", name = "material3-android", version.ref = "material3Android" } +## firebase +firebase-bom = { group = "com.google.firebase", name = "firebase-bom", version.ref = "firebaseBom" } +firebase-analytics = { group = "com.google.firebase", name = "firebase-analytics" } +firebase-crashlytics = { group = "com.google.firebase", name = "firebase-crashlytics" } + [bundles] [plugins] @@ -178,3 +187,5 @@ kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", versi hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } verify-detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" } ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" } +firebase-services = { id = "com.google.gms.google-services", version.ref = "firebasePlugin" } +firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebaseCrashlytics" }