diff --git a/.gitignore b/.gitignore index d0dffdd..24cc952 100644 --- a/.gitignore +++ b/.gitignore @@ -53,7 +53,7 @@ render.experimental.xml .cxx/ # Google Services (e.g. APIs or Firebase) -# google-services.json +google-services.json # Freeline freeline.zip @@ -82,3 +82,6 @@ lint/tmp/ # macOS .DS_Store + +# Cursor IDE +.cursorrules diff --git a/app/build.gradle.kts b/app/build.gradle.kts index c1b6468..f84666b 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,6 +1,8 @@ plugins { alias(libs.plugins.twix.android.application) alias(libs.plugins.twix.koin) + alias(libs.plugins.google.firebase.crashlytics) + alias(libs.plugins.google.services) } android { @@ -32,4 +34,8 @@ dependencies { implementation(projects.data) implementation(projects.domain) implementation(projects.feature.login) + + // Firebase + implementation(platform(libs.google.firebase.bom)) + implementation(libs.google.firebase.crashlytics) } diff --git a/build-logic/convention/src/main/kotlin/com/twix/convention/FeatureConventionPlugin.kt b/build-logic/convention/src/main/kotlin/com/twix/convention/FeatureConventionPlugin.kt index 1f56f4c..fb110ff 100644 --- a/build-logic/convention/src/main/kotlin/com/twix/convention/FeatureConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/com/twix/convention/FeatureConventionPlugin.kt @@ -10,6 +10,7 @@ class FeatureConventionPlugin : BuildLogicConventionPlugin({ apply() dependencies { + implementation(project(":core:analytics")) implementation(project(":core:design-system")) implementation(project(":core:navigation")) implementation(project(":core:ui")) diff --git a/build.gradle.kts b/build.gradle.kts index 524b691..4035384 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,6 +7,8 @@ plugins { alias(libs.plugins.serialization) apply false alias(libs.plugins.jetbrains.kotlin.jvm) apply false alias(libs.plugins.android.library) apply false + alias(libs.plugins.google.services) apply false + alias(libs.plugins.google.firebase.crashlytics) apply false } allprojects { diff --git a/core/analytics/build.gradle.kts b/core/analytics/build.gradle.kts new file mode 100644 index 0000000..83f559f --- /dev/null +++ b/core/analytics/build.gradle.kts @@ -0,0 +1,13 @@ +plugins { + alias(libs.plugins.twix.android.library) + alias(libs.plugins.twix.koin) +} + +android { + namespace = "com.twix.analytics" +} + +dependencies { + implementation(platform(libs.google.firebase.bom)) + api(libs.google.firebase.analytics) +} diff --git a/core/analytics/src/main/AndroidManifest.xml b/core/analytics/src/main/AndroidManifest.xml new file mode 100644 index 0000000..8bdb7e1 --- /dev/null +++ b/core/analytics/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + diff --git a/core/analytics/src/main/kotlin/com/twix/analytics/di/.gitKeep b/core/analytics/src/main/kotlin/com/twix/analytics/di/.gitKeep new file mode 100644 index 0000000..e69de29 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7cc8770..095e860 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -18,6 +18,9 @@ androidx-lifecycle-runtime-ktx = "2.10.0" # Google material = "1.13.0" +google-services = "4.4.4" +google-firebase-bom = "34.7.0" +google-firebase-crashlytics = "3.0.6" # Compose activity-compose = "1.12.0" @@ -64,6 +67,10 @@ android-junit5-gradle-plugin = { group = "de.mannodermaus.gradle.plugins", name # Google material = { group = "com.google.android.material", name = "material", version.ref = "material" } +google-firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "google-firebase-bom" } +google-firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics" } +google-firebase-analytics = { module = "com.google.firebase:firebase-analytics" } +google-firebase-messaging = { module = "com.google.firebase:firebase-messaging" } # Kotlin kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinx-coroutines-core" } @@ -168,6 +175,8 @@ ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" } serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } jetbrains-kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "jetbrains-kotlin-jvm" } android-library = { id = "com.android.library", version.ref = "agp" } +google-services = { id = "com.google.gms.google-services", version.ref = "google-services" } +google-firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "google-firebase-crashlytics" } # Convention Plugins twix-android-application = { id = "twix.android.application", version = "unspecified" } diff --git a/settings.gradle.kts b/settings.gradle.kts index 9cc7038..e8d75d0 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -34,3 +34,4 @@ include(":core:ui") include(":core:navigation") include(":core:design-system") include(":core:network") +include(":core:analytics")