diff --git a/.gitignore b/.gitignore index 5ac68f8..4fc1cd6 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,6 @@ node_modules/ # Media assets (audio .m4a + subtitle .lrc) — large/licensed, kept out of Version Control. *.m4a *.lrc + +# Firebase config (App Distribution) — per-developer, not tracked (see google-services.example.json) +androidApp/google-services.json diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts index e3204c1..32f8081 100644 --- a/androidApp/build.gradle.kts +++ b/androidApp/build.gradle.kts @@ -4,6 +4,14 @@ plugins { alias(libs.plugins.androidApplication) alias(libs.plugins.composeMultiplatform) alias(libs.plugins.composeCompiler) + // Used for App Distribution + alias(libs.plugins.googleServices) apply false +} + +// Apply Google Services only when the Firebase config is present: google-services.json is not +// tracked in git (see google-services.example.json), so builds must work without it. +if (file("google-services.json").exists()) { + apply(plugin = libs.plugins.googleServices.get().pluginId) } kotlin { diff --git a/androidApp/google-services.example.json b/androidApp/google-services.example.json new file mode 100644 index 0000000..693e372 --- /dev/null +++ b/androidApp/google-services.example.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "000000000000", + "project_id": "your-firebase-project-id", + "storage_bucket": "your-firebase-project-id.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:000000000000:android:0000000000000000000000", + "android_client_info": { + "package_name": "bzh.ajaury.chombev" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "YOUR_FIREBASE_API_KEY" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} diff --git a/build.gradle.kts b/build.gradle.kts index f1eee3c..60ad16f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,4 +7,5 @@ plugins { alias(libs.plugins.composeCompiler) apply false alias(libs.plugins.kotlinJvm) apply false alias(libs.plugins.kotlinMultiplatform) apply false -} \ No newline at end of file + alias(libs.plugins.googleServices) apply false +} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d9531fd..79647f8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,6 +11,7 @@ navigation3 = "1.1.1" composeMultiplatform = "1.11.1" composeIconsExtended = "1.7.3" glitchtips = "8.47.0" +googleServices = "4.5.0" kotlin = "2.4.0" kotlinWrappers = "2026.7.0" kotlinxBrowser = "0.5.0" @@ -68,6 +69,7 @@ androidApplication = { id = "com.android.application", version.ref = "agp" } androidMultiplatformLibrary = { id = "com.android.kotlin.multiplatform.library", version.ref = "agp" } composeMultiplatform = { id = "org.jetbrains.compose", version.ref = "composeMultiplatform" } composeCompiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } +googleServices = { id = "com.google.gms.google-services", version.ref = "googleServices" } kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } kotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlinSerialization"} \ No newline at end of file