From 003f5af922dd208d2b0b84079d8d83774c075d33 Mon Sep 17 00:00:00 2001 From: Abhishek Pandey <64667840+1abhishekpandey@users.noreply.github.com> Date: Mon, 13 Jan 2025 17:06:37 +0530 Subject: [PATCH 1/3] feat: replace hyphen with underscore in event names and properties, and traits --- .github/workflows/draft_new_release.yml | 2 +- CODEOWNERS | 2 +- .../android/integration/firebase/Utils.java | 2 +- .../android/sample/kotlin/MainActivity.kt | 12 ++++++++++++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/draft_new_release.yml b/.github/workflows/draft_new_release.yml index 060a087..c050ca6 100644 --- a/.github/workflows/draft_new_release.yml +++ b/.github/workflows/draft_new_release.yml @@ -73,4 +73,4 @@ jobs: github_token: ${{ secrets.PAT }} pr_title: "chore(release): pulling ${{ steps.create-release.outputs.branch_name }} into master" pr_body: ":crown: *An automated PR*" - pr_reviewer: 'itsdebs' + pr_reviewer: "@rudderlabs/sdk-android" diff --git a/CODEOWNERS b/CODEOWNERS index f59bb8b..ce19134 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1 @@ -* @ChryssaAliferi @itsdebs \ No newline at end of file +* @rudderlabs/sdk-android diff --git a/firebase/src/main/java/com/rudderstack/android/integration/firebase/Utils.java b/firebase/src/main/java/com/rudderstack/android/integration/firebase/Utils.java index ab39555..b224fc7 100644 --- a/firebase/src/main/java/com/rudderstack/android/integration/firebase/Utils.java +++ b/firebase/src/main/java/com/rudderstack/android/integration/firebase/Utils.java @@ -100,7 +100,7 @@ static Map transformUserTraits(Map userTraits) { } static String getTrimKey(String key) { - String firebaseEvent = key.toLowerCase().trim().replace(" ", "_"); + String firebaseEvent = key.toLowerCase().trim().replace(" ", "_").replace("-", "_"); if (firebaseEvent.length() > 40) { firebaseEvent = firebaseEvent.substring(0, 40); } diff --git a/sample-kotlin/src/main/java/com/rudderstack/android/sample/kotlin/MainActivity.kt b/sample-kotlin/src/main/java/com/rudderstack/android/sample/kotlin/MainActivity.kt index 93ceda3..46a29f3 100644 --- a/sample-kotlin/src/main/java/com/rudderstack/android/sample/kotlin/MainActivity.kt +++ b/sample-kotlin/src/main/java/com/rudderstack/android/sample/kotlin/MainActivity.kt @@ -107,6 +107,7 @@ class MainActivity : AppCompatActivity() { // Inserting Array types into Traits traits.put("intArr", arr) traits.put("justArr", justArr) + traits.put("key-with-hyphen", "value with hyphen") // Inserting Object Types into Traits MainApplication.rudderClient.identify("user_id_4", traits, null) } @@ -335,6 +336,11 @@ class MainActivity : AppCompatActivity() { "Track event with properties", getCustomProperties() ) + + MainApplication.rudderClient.track( + "Track-event-with-hyphen", + getCustomProperties() + ) } // Screen events @@ -350,6 +356,11 @@ class MainActivity : AppCompatActivity() { "Screen event with properties", getCustomProperties() ) + + MainApplication.rudderClient.track( + "Screen-event-with-hyphen", + getCustomProperties() + ) } private fun getCustomProperties(): RudderProperty = @@ -359,4 +370,5 @@ class MainActivity : AppCompatActivity() { .putValue("key2", 100) .putValue("key3", 200.25) .putValue("key4", true) + .putValue("key-with-hyphen", "value with hyphen") } From 38c2e412bc2441ab3d6ea200afee8ce45e4bbf9b Mon Sep 17 00:00:00 2001 From: GitHub actions Date: Mon, 13 Jan 2025 11:37:21 +0000 Subject: [PATCH 2/3] chore(release): 3.3.0 --- CHANGELOG.md | 7 +++++++ gradle.properties | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50eb5c2..eaff413 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [3.3.0](https://github.com/rudderlabs/rudder-integration-firebase-android/compare/v3.2.0...v3.3.0) (2025-01-13) + + +### Features + +* replace hyphen with underscore in event names and properties, and traits ([003f5af](https://github.com/rudderlabs/rudder-integration-firebase-android/commit/003f5af922dd208d2b0b84079d8d83774c075d33)) + ## 3.2.0 (2024-11-05) diff --git a/gradle.properties b/gradle.properties index 9e6b088..7d10e99 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,10 +12,10 @@ POM_NAME=Rudder-Integration-Firebase-Android POM_DESCRIPTION=RudderStack\'s Native SDK Integration support for Firebase. GROUP=com.rudderstack.android.integration POM_LICENCE_DIST=repo -VERSION_NAME=3.2.0 +VERSION_NAME=3.3.0 POM_LICENCE_NAME=The MIT License (MIT) POM_DEVELOPER_NAME=Rudderstack, Inc. -VERSION_CODE=13 +VERSION_CODE=14 POM_URL=https://github.com/rudderlabs/rudder-integration-firebase-android POM_SCM_URL=https://github.com/rudderlabs/rudder-integration-firebase-android/tree/master POM_SCM_CONNECTION=scm:git:git://github.com/rudderlabs/rudder-integration-firebase-android.git diff --git a/package-lock.json b/package-lock.json index 9ebded4..23d3645 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "rudder-integration-firebase-android", - "version": "3.2.0", + "version": "3.3.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "3.2.0", + "version": "3.3.0", "dependencies": { "properties-reader": "^2.2.0" } diff --git a/package.json b/package.json index 3c2241f..b1f3b2b 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "3.2.0", + "version": "3.3.0", "dependencies": { "properties-reader": "^2.2.0" } From b8d1178db30b3edc5b13b6f614d4c7b09d59aa93 Mon Sep 17 00:00:00 2001 From: Abhishek Pandey <64667840+1abhishekpandey@users.noreply.github.com> Date: Mon, 13 Jan 2025 17:09:38 +0530 Subject: [PATCH 3/3] chore: update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eaff413..9fd3daa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ All notable changes to this project will be documented in this file. See [standa ### Features -* replace hyphen with underscore in event names and properties, and traits ([003f5af](https://github.com/rudderlabs/rudder-integration-firebase-android/commit/003f5af922dd208d2b0b84079d8d83774c075d33)) +* replace hyphen (`-`) with underscore (`_`) present in the event name and its properties, and also in the identify event traits ([003f5af](https://github.com/rudderlabs/rudder-integration-firebase-android/commit/003f5af922dd208d2b0b84079d8d83774c075d33)) ## 3.2.0 (2024-11-05)