Skip to content

Commit

Permalink
Merge pull request #3 from 2rabs/rt/add-crashlytics-for-android
Browse files Browse the repository at this point in the history
🔧 Android に Crashlytics を追加
  • Loading branch information
tatsutakein authored Nov 16, 2023
2 parents c7f604f + 658a2dc commit 2c5ebdd
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ plugins {
id("nito.primitive.android.kotlin")
id("nito.primitive.android.compose")
id("nito.primitive.android.hilt")
id("nito.primitive.android.firebase")
id("nito.primitive.android.crashlytics")
}

val keystorePropertiesFile = project.file("keystore.properties")
Expand Down
29 changes: 29 additions & 0 deletions app/android/src/dev/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"project_info": {
"project_number": "699928546170",
"project_id": "club-nito-dev",
"storage_bucket": "club-nito-dev.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:699928546170:android:dc1049d2d9b1ad054324c3",
"android_client_info": {
"package_name": "club.nito.app.dev"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyCgfq_BX7p7rA_mIquA4_SxVe1_hv_oQpQ"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}
Empty file added app/android/src/prod/.gitkeep
Empty file.
4 changes: 4 additions & 0 deletions build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ gradlePlugin {
id = "nito.primitive.android.crashlytics"
implementationClass = "club.nito.primitive.AndroidCrashlyticsPlugin"
}
register("androidFirebase") {
id = "nito.primitive.android.firebase"
implementationClass = "club.nito.primitive.AndroidFirebasePlugin"
}
register("kmp") {
id = "nito.primitive.kmp"
implementationClass = "club.nito.primitive.KmpPlugin"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package club.nito.primitive

import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.dependencies

@Suppress("unused")
class AndroidFirebasePlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
with(pluginManager) {
apply("com.google.gms.google-services")
}

android {
packagingOptions {
resources {
excludes += "META-INF/gradle/incremental.annotation.processors"
}
}
}
dependencies {
implementationPlatform(libs.library("firebaseBom"))
implementation(libs.library("firebaseAuth"))
implementation(libs.library("firebaseCommon"))
implementation(libs.library("multiplatformFirebaseAuth"))
}
}
}
}

0 comments on commit 2c5ebdd

Please sign in to comment.