Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

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.

## 2.0.0 (2025-04-24)


### ⚠ BREAKING CHANGES

* update braze sdk version to 35.0.0 (#36)

### Features

* add australia and united states regions support in braze sdk ([#35](https://github.com/rudderlabs/rudder-integration-braze-android/issues/35)) ([f0c9a35](https://github.com/rudderlabs/rudder-integration-braze-android/commit/f0c9a35007afbfeb6db58f33b6e214c44211f22c))
* update braze sdk version to 35.0.0 ([#36](https://github.com/rudderlabs/rudder-integration-braze-android/issues/36)) ([cc1faab](https://github.com/rudderlabs/rudder-integration-braze-android/commit/cc1faab8ccbc161ed40d478395fd279195cb12bc))


### Bug Fixes

* merging of anonymous with identified profile ([#33](https://github.com/rudderlabs/rudder-integration-braze-android/issues/33)) ([f7a3cc8](https://github.com/rudderlabs/rudder-integration-braze-android/commit/f7a3cc88a1eb6d6dde7c84e316d6127d4be5d6a3))

## [1.3.0](https://github.com/rudderlabs/rudder-integration-braze-android/compare/v1.2.0...v1.3.0) (2023-08-28)


Expand All @@ -23,4 +40,4 @@ All notable changes to this project will be documented in this file. See [standa
### Features

* add ci/cd pipeline ([e94987c](https://github.com/rudderlabs/rudder-integration-braze-android/commit/e94987cd0fb07daf9f6dd683f3712bca405b09a0))
* deduplication feature for Braze device-mode ([d60e27a](https://github.com/rudderlabs/rudder-integration-braze-android/commit/d60e27aa9b91e4cce24702385b2b8567e839c2bf)), closes [#15](https://github.com/rudderlabs/rudder-integration-braze-android/issues/15) [#14](https://github.com/rudderlabs/rudder-integration-braze-android/issues/14) [#12](https://github.com/rudderlabs/rudder-integration-braze-android/issues/12)
* deduplication feature for Braze device-mode ([d60e27a](https://github.com/rudderlabs/rudder-integration-braze-android/commit/d60e27aa9b91e4cce24702385b2b8567e839c2bf)), closes [#15](https://github.com/rudderlabs/rudder-integration-braze-android/issues/15) [#14](https://github.com/rudderlabs/rudder-integration-braze-android/issues/14) [#12](https://github.com/rudderlabs/rudder-integration-braze-android/issues/12)
18 changes: 9 additions & 9 deletions braze/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 31
compileSdk 34

buildFeatures {
buildConfig = true
}

defaultConfig {
minSdkVersion 19
targetSdkVersion 31
minSdkVersion 25
buildConfigField("String", "VERSION_NAME", "\"${VERSION_NAME}\"")
}

Expand All @@ -15,10 +18,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

namespace 'com.rudderstack.android.integration.braze'
}

Expand All @@ -29,7 +29,7 @@ dependencies {
// RudderStack SDK
compileOnly 'com.rudderstack.android.sdk:core:[1.12,2.0)'
// Braze SDK
implementation 'com.braze:android-sdk-ui:[27.0,28.0)'
implementation 'com.braze:android-sdk-ui:35.0.0'

implementation 'com.google.code.gson:gson:2.8.9'
testImplementation 'com.android.support.test:rules:1.0.2'
Expand All @@ -44,4 +44,4 @@ dependencies {


apply from: rootProject.file('gradle/mvn-publish.gradle')
apply from: rootProject.file('gradle/codecov.gradle')
apply from: rootProject.file('gradle/codecov.gradle')
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ enum ConnectionMode {
private static final List<String> RESERVED_KEY_SET = Arrays.asList(BIRTHDAY, EMAIL, FIRSTNAME,
LASTNAME, GENDER, PHONE, ADDRESS);

private static final String RUDDER_LABEL = "rudder_id";

// Braze instance
private Braze braze;

Expand All @@ -148,7 +150,7 @@ enum ConnectionMode {
public static final Factory FACTORY = new Factory() {
@Override
public RudderIntegration<?> create(Object settings, RudderClient client, RudderConfig rudderConfig) {
return new BrazeIntegrationFactory(settings, rudderConfig);
return new BrazeIntegrationFactory(settings, client, rudderConfig);
}

@Override
Expand All @@ -157,7 +159,7 @@ public String key() {
}
};

private BrazeIntegrationFactory(Object config, RudderConfig rudderConfig) {
private BrazeIntegrationFactory(Object config, RudderClient client, RudderConfig rudderConfig) {
String apiKey = "";
Map<String, Object> destinationConfig = (Map<String, Object>) config;
if (destinationConfig == null) {
Expand Down Expand Up @@ -214,6 +216,9 @@ private BrazeIntegrationFactory(Object config, RudderConfig rudderConfig) {
case "US-06":
customEndPoint = "sdk.iad-06.braze.com";
break;
case "US-07":
customEndPoint = "sdk.iad-07.braze.com";
break;
case "US-08":
customEndPoint = "sdk.iad-08.braze.com";
break;
Expand All @@ -223,6 +228,9 @@ private BrazeIntegrationFactory(Object config, RudderConfig rudderConfig) {
case "EU-02":
customEndPoint = "sdk.fra-02.braze.eu";
break;
case "AU-01":
customEndPoint = "sdk.au-01.braze.com";
break;
}
if (customEndPoint == null) {
RudderLogger.logError("CustomEndPointUrl is blank or incorrect. Aborting Braze initialization.");
Expand All @@ -247,6 +255,7 @@ private BrazeIntegrationFactory(Object config, RudderConfig rudderConfig) {
);
Braze.configure(RudderClient.getApplication().getApplicationContext(), builder.build());
this.braze = Braze.getInstance(RudderClient.getApplication());
setUserAlias(client.getAnonymousId());
RudderLogger.logInfo("Configured Braze + Rudder integration and initialized Braze.");

RudderClient.getApplication().registerActivityLifecycleCallbacks(new Application.ActivityLifecycleCallbacks() {
Expand Down Expand Up @@ -296,6 +305,10 @@ public void onActivityDestroyed(@NonNull Activity activity) {
}
}

private void setUserAlias(String anonymousId) {
this.braze.getCurrentUser().addAlias(anonymousId, RUDDER_LABEL);
}

private void processTrackEvent(RudderMessage element) {
String event = element.getEventName();
if (event == null) {
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20'
classpath 'com.android.tools.build:gradle:8.6.1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0'
}
}

Expand All @@ -25,4 +25,4 @@ task clean(type: Delete) {
}

apply from: rootProject.file('gradle/promote.gradle')
apply from: rootProject.file('gradle/codecov.gradle')
apply from: rootProject.file('gradle/codecov.gradle')
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ POM_LICENCE_URL=http://opensource.org/licenses/MIT
org.gradle.jvmargs=-Xmx1536m
POM_DEVELOPER_ID=Rudderstack
POM_LICENCE_NAME=The MIT License (MIT)
VERSION_CODE=4
VERSION_CODE=5
POM_DEVELOPER_NAME=Rudderstack, Inc.
POM_LICENCE_DIST=repo
VERSION_NAME=1.3.0
VERSION_NAME=2.0.0
POM_URL=https://github.com/rudderlabs/rudder-integration-braze-android
POM_SCM_URL=https://github.com/rudderlabs/rudder-integration-braze-android/tree/master
POM_SCM_CONNECTION=scm:git:git://github.com/rudderlabs/rudder-integration-braze-android.git
Expand Down
10 changes: 5 additions & 5 deletions gradle/codecov.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ task codeCoverageReport(type: JacocoReport) {
executionData.setFrom(execData)

reports {
xml.enabled true
xml.destination file("${buildDir}/reports/jacoco/report.xml")
html.enabled true
csv.enabled false
xml.required.set true
xml.outputLocation.set file("${buildDir}/reports/jacoco/report.xml")
html.required.set true
csv.required.set false
}
}
}
8 changes: 7 additions & 1 deletion gradle/mvn-publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ signing {
sign publishing.publications
}

if(POM_PACKAGING == "aar"){
tasks.named("signReleasePublication").configure { dependsOn("bundleReleaseAar") }
}else{
tasks.named("signReleasePublication").configure { dependsOn("jar") }
}

publish.dependsOn build
publishToMavenLocal.dependsOn build
publishToSonatype.dependsOn publish
publishToSonatype.dependsOn publish
6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Feb 21 19:29:08 IST 2022
#Thu Apr 17 12:02:39 IST 2025
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.3.0",
"version": "2.0.0",
"dependencies": {
"properties-reader": "^2.2.0"
}
Expand Down
25 changes: 14 additions & 11 deletions sample-kotlin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,28 @@ buildscript {
google()
}
dependencies {
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0'
}
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

Properties properties = new Properties()
if (project.rootProject.file('sample-kotlin/local.properties').canRead()) {
properties.load(project.rootProject.file("sample-kotlin/local.properties").newDataInputStream())
}

android {
compileSdkVersion 33
compileSdk 35

buildFeatures {
buildConfig = true
}

defaultConfig {
applicationId "com.rudderlabs.android.rudderlabs.rudderlabstest"
minSdkVersion 19
targetSdkVersion 33
minSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
Expand All @@ -41,19 +43,20 @@ android {
}

compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
namespace 'com.rudderlabs.android.sample.kotlin'

}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10"
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.core:core-ktx:1.9.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.10"
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.core:core-ktx:1.15.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation "androidx.multidex:multidex:2.0.1"


implementation 'com.rudderstack.android.sdk:core:[1.0,2.0)'
implementation project(':braze')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.rudderlabs.android.sample.kotlin

import android.app.Application
import com.rudderlabs.android.sample.kotlin.BuildConfig
import com.rudderstack.android.integration.braze.BrazeIntegrationFactory
import com.rudderstack.android.sdk.core.RudderClient
import com.rudderstack.android.sdk.core.RudderConfig
Expand All @@ -10,8 +9,6 @@ import com.rudderstack.android.sdk.core.RudderLogger
class MainApplication : Application() {
companion object {
lateinit var rudderClient: RudderClient
const val WRITE_KEY = "2NHVCL9JbmZGFA3RTNZf7hh0j7k"
const val DATA_PLANE_URL = "https://rudderstacz.dataplane.rudderstack.com"
}

override fun onCreate() {
Expand All @@ -29,4 +26,4 @@ class MainApplication : Application() {
.build()
)
}
}
}