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
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@
[submodule "kits/iterable-kit"]
path = kits/iterable-kit
url = git@github.com:mparticle-integrations/mparticle-android-integration-iterable.git
[submodule "kits/leanplum-kit"]
path = kits/leanplum-kit
url = git@github.com:mparticle-integrations/mparticle-android-integration-leanplum.git
[submodule "kits/onetrust-kit"]
path = kits/onetrust-kit
url = git@github.com:mparticle-integrations/mparticle-android-integration-onetrust.git
Expand Down
6 changes: 6 additions & 0 deletions .mobsf
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@
- android-kit-base/src/test/
- android-kit-base/src/androidTest/
- testutils/
- "**/src/test/**"
- "**/example/**"
- "**/*-example/**"

ignore-rules:
- webview_javascript_interface # Intentional: JS bridge for mParticle WebView SDK; workspace token controls access
- android_manifest_insecure_minsdk_error # Example apps; SDK minSdk 14+ per AGENTS.md
- android_manifest_allow_backup # Example apps only; acceptable for demo/debug
- hardcoded_api_key
- hardcoded_username
- android_kotlin_hardcoded
Expand Down
1 change: 1 addition & 0 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ lint:
- kits/ga/ga-23/**
- kits/ga4/ga4-23/**
- kits/kochava/kochava-5/**
- kits/leanplum/leanplum-7/**
- kits/rokt/rokt/**
- kits/localytics/localytics-6/**
actions:
Expand Down
2 changes: 1 addition & 1 deletion kits/braze/braze-38/example/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package="com.mparticle.kits.braze.example">

<application
android:allowBackup="true"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ import org.mockito.Mockito
import org.mockito.MockitoAnnotations
import java.lang.reflect.Method
import java.math.BigDecimal
import java.security.SecureRandom
import java.util.Calendar
import java.util.Locale
import java.util.Random

class AppboyKitTests {
private var random = Random()
private var random = SecureRandom()

private lateinit var braze: Braze.Companion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import org.mockito.MockitoAnnotations
import java.lang.ref.WeakReference
import java.lang.reflect.Method
import java.lang.reflect.Modifier
import java.security.SecureRandom
import java.util.HashMap
import java.util.Random

/**
* Example local unit test, which will execute on the development machine (host).
Expand All @@ -44,7 +44,7 @@ import java.util.Random
class GoogleAnalyticsFirebaseKitTest {
private lateinit var kitInstance: GoogleAnalyticsFirebaseKit
private lateinit var firebaseSdk: FirebaseAnalytics
var random = Random()
var random = SecureRandom()

@Mock
lateinit var user: MParticleUser
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ import org.mockito.MockitoAnnotations
import java.lang.ref.WeakReference
import java.lang.reflect.Method
import java.lang.reflect.Modifier
import java.security.SecureRandom
import java.util.HashMap
import java.util.Random

/**
* Example local unit test, which will execute on the development machine (host).
Expand All @@ -46,15 +46,14 @@ import java.util.Random
class GoogleAnalyticsFirebaseGA4KitTest {
private lateinit var kitInstance: GoogleAnalyticsFirebaseGA4Kit
private lateinit var firebaseSdk: FirebaseAnalytics
private var random = SecureRandom()

@Mock
lateinit var user: MParticleUser

@Mock
lateinit var filteredMParticleUser: FilteredMParticleUser

private var random = Random()

@Before
@Throws(JSONException::class)
fun before() {
Expand Down
1 change: 0 additions & 1 deletion kits/leanplum-kit
Submodule leanplum-kit deleted from dc2fa8
47 changes: 47 additions & 0 deletions kits/leanplum/leanplum-7/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
## Leanplum Kit Integration

This repository contains the [Leanplum](https://www.leanplum.com/) integration for the [mParticle Android SDK](https://github.com/mParticle/mparticle-android-sdk).

### Adding the integration

1. The Leanplum Kit requires that you add Leanplum's Maven server to your buildscript:

```
repositories {
maven { url "http://www.leanplum.com/leanplum-sdks/" }
...
}
```

2. Add the kit dependency to your app's build.gradle:

```groovy
dependencies {
implementation 'com.mparticle:android-leanplum-kit:5+'
}
```

3. Follow the mParticle Android SDK [quick-start](https://github.com/mParticle/mparticle-android-sdk), then rebuild and launch your app, and verify that you see `"Leanplum detected"` in the output of `adb logcat`.
4. Reference mParticle's integration docs below to enable the integration.

### GCM Compatibility

Leanplum is deprecating GCM support, but it is still available. While we recommend migrating to FCM, if your application requires GCM, take the following steps:

1. Exclude the FCM transient dependency in the leanplum kit

```groovy
dependencies {
implementation ('com.mparticle:android-leanplum-kit:REPLACE-ME') {
exclude module: 'leanplum-fcm'
}
implementation 'com.leanplum:leanplum-gcm:4.1.1'
}
```
### Documentation

[Leanplum integration](https://docs.mparticle.com/integrations/leanplum/event/)

### License

[Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)
67 changes: 67 additions & 0 deletions kits/leanplum/leanplum-7/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
buildscript {
ext.kotlin_version = '2.0.20'
if (!project.hasProperty('version') || project.version.equals('unspecified')) {
project.version = '+'
}

repositories {
google()
mavenLocal()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:8.1.4'
classpath 'com.mparticle:android-kit-plugin:' + project.version
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

plugins {
id "org.sonarqube" version "3.5.0.2730"
id "org.jlleitschuh.gradle.ktlint" version "13.0.0"
}

sonarqube {
properties {
property "sonar.projectKey", "mparticle-android-integration-leanplum"
property "sonar.organization", "mparticle"
property "sonar.host.url", "https://sonarcloud.io"
}
}

apply plugin: 'org.jlleitschuh.gradle.ktlint'
apply plugin: 'kotlin-android'
apply plugin: 'com.mparticle.kit'

android {
namespace 'com.mparticle.kits.leanplum'
buildFeatures {
buildConfig = true
}
defaultConfig {
minSdkVersion 16
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
testOptions {
unitTests.all {
jvmArgs += ['--add-opens', 'java.base/java.lang=ALL-UNNAMED']
}
}
}

repositories {
maven { url 'https://repo.leanplum.com' }
mavenCentral()
}

dependencies {
testImplementation 'org.mockito:mockito-core:5.1.1'
api 'com.leanplum:leanplum-fcm:7.0.1'
}
6 changes: 6 additions & 0 deletions kits/leanplum/leanplum-7/consumer-proguard.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-keepclassmembers class *
{
@com.leanplum.annotations.* <fields>;
}
-keep class com.leanplum.** { *; }
-dontwarn com.leanplum.**
4 changes: 4 additions & 0 deletions kits/leanplum/leanplum-7/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
android.enableJetifier=true
android.useAndroidX=true
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx2560m
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading