From 1b9d878fde5329f29efec191f0154e076707d2e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan?= Date: Sat, 5 Mar 2022 16:07:21 +0100 Subject: [PATCH] feat: add firebase support --- app/build.gradle | 7 +++++++ app/google-services.json | 39 +++++++++++++++++++++++++++++++++++++++ build.gradle | 5 +---- 3 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 app/google-services.json diff --git a/app/build.gradle b/app/build.gradle index b7086307..685af6f8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,6 +3,7 @@ plugins { id 'kotlin-android' id 'jacoco' } +apply plugin: 'com.google.gms.google-services' android { compileSdk 31 @@ -46,6 +47,12 @@ dependencies { androidTestImplementation 'androidx.test:runner:1.4.0' androidTestImplementation 'androidx.test:rules:1.4.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + // Import the BoM for the Firebase platform + implementation platform('com.google.firebase:firebase-bom:29.0.0') + + // Declare the dependency for the Cloud Firestore library + // When using the BoM, you don't specify versions in Firebase library dependencies + implementation 'com.google.firebase:firebase-firestore-ktx' } tasks.withType(Test) { jacoco.includeNoLocationClasses = true diff --git a/app/google-services.json b/app/google-services.json new file mode 100644 index 00000000..7361499f --- /dev/null +++ b/app/google-services.json @@ -0,0 +1,39 @@ +{ + "project_info": { + "project_number": "896605409351", + "project_id": "rps-sdp", + "storage_bucket": "rps-sdp.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:896605409351:android:2e2400835d053e3463a162", + "android_client_info": { + "package_name": "ch.epfl.sweng.rps" + } + }, + "oauth_client": [ + { + "client_id": "896605409351-a1hlsfr6dkigthpbeul0ug46c8774uoa.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyAdcohQUAuqHrgmKyTD8Tx2JOxuOXWBn6o" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "896605409351-a1hlsfr6dkigthpbeul0ug46c8774uoa.apps.googleusercontent.com", + "client_type": 3 + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/build.gradle b/build.gradle index 573415f0..808031d1 100644 --- a/build.gradle +++ b/build.gradle @@ -7,12 +7,9 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:7.1.2' classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files + classpath 'com.google.gms:google-services:4.3.10' } } - task clean(type: Delete) { delete rootProject.buildDir } \ No newline at end of file