Skip to content

Commit

Permalink
RMET-3608 FB Analytics - Update dependency to Firebase Analytics Andr…
Browse files Browse the repository at this point in the history
…oid SDK (#40)

* feat: use Firebase Android BOM library to set the version of FB Analytics

Context: According to the documentation, this is the recommended way of controlling Firebase library versions. This way, using the Firebase Android BOM, an app with multiple Firebase Android libraries will always use compatible versions of these libraries.

References: https://outsystemsrd.atlassian.net/browse/RMET-3608

* fix: declare Firebase dependencies in build.gradle file

References: https://outsystemsrd.atlassian.net/browse/RMET-3608

* test: use framework to set firebase-analytics version

References: https://outsystemsrd.atlassian.net/browse/RMET-3608

* refactor: declare Firebase dependencies in build.gradle file

References: https://outsystemsrd.atlassian.net/browse/RMET-3608

* fix: enable Kotlin

Context: This is necessary for MABS 9. We currently say that the current version of the plugin works with MABS 9 and MAS 10, but it actually doesn't work with MABS 9 because we use Kotlin code but do not enable the Kotlin plugin.

References: https://outsystemsrd.atlassian.net/browse/RMET-3608

* test: enable AndroidX

* chore: revert previous commit

* fix: enable Kotlin

Context: This is necessary for MABS 9. We currently say that the current version of the plugin works with MABS 9 and MAS 10, but it actually doesn't work with MABS 9 because we use Kotlin code but do not enable the Kotlin plugin.

References: https://outsystemsrd.atlassian.net/browse/RMET-3608

* fix: revert previous commit

* test: include FB Analytics using framework

* test: enable Kotlin

* refactor: include FB dependencies in build.gradle

References: https://outsystemsrd.atlassian.net/browse/RMET-3608

* chore: revert previous commit that added Kotlin

* chore: update changelog

https://outsystemsrd.atlassian.net/browse/RMET-3608
  • Loading branch information
alexgerardojacinto authored Sep 13, 2024
1 parent 069dd6c commit 7da9664
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

The changes documented here do not include those from the original repository.

## Unreleased
- Android | Update dependency to Firebase Analytics Android library (https://outsystemsrd.atlassian.net/browse/RMET-3608).

## 5.0.0-OS13
- Fix: Make `ANALYTICS_COLLECTION_ENABLED` configurable (https://outsystemsrd.atlassian.net/browse/RMET-3503).

Expand Down
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ buildscript {
}
}

dependencies {
implementation platform('com.google.firebase:firebase-bom:33.2.0')
implementation("com.google.firebase:firebase-analytics")
}

// use postBuildExtras to make sure the plugin is applied after
// cdvPluginPostBuildExtras. Therefore if googleServices is added
// to cdvPluginPostBuildExtras somewhere else, the plugin execution
Expand Down
2 changes: 0 additions & 2 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ xmlns:android="http://schemas.android.com/apk/res/android"
</platform>

<platform name="android">
<preference name="ANDROID_FIREBASE_ANALYTICS_VERSION" default="21.1.1"/>

<hook type="after_prepare" src="hooks/android/androidCopyPreferences.js" />

Expand All @@ -103,7 +102,6 @@ xmlns:android="http://schemas.android.com/apk/res/android"

<dependency id="cordova-support-android-plugin" version="~1.0.0"/>

<framework src="com.google.firebase:firebase-analytics:$ANDROID_FIREBASE_ANALYTICS_VERSION" />
<framework src="build.gradle" custom="true" type="gradleReference" />

<source-file src="src/android/com/outsystems/firebase/analytics/FirebaseAnalyticsPlugin.java" target-dir="src/com/outsystems/plugins/firebase/analytics/" />
Expand Down

0 comments on commit 7da9664

Please sign in to comment.