Skip to content

Commit 80c1bcf

Browse files
sahil-roktMansi-mParticle
authored andcommitted
Initial Rokt Kit Integration
1 parent c523270 commit 80c1bcf

File tree

14 files changed

+613
-26
lines changed

14 files changed

+613
-26
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gradle
4+
directory: "/"
5+
target-branch: "development"
6+
labels: [ "dependabot" ]
7+
schedule:
8+
interval: "daily"
9+
open-pull-requests-limit: 10
10+
commit-message:
11+
prefix: "chore"

.gitignore

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,37 @@
1-
# Gradle files
2-
.gradle/
3-
build/
1+
# built application files
2+
*.apk
3+
*.ap_
4+
5+
# files for the dex VM
6+
*.dex
7+
8+
# Java class files
9+
*.class
10+
11+
# generated files
12+
bin/
13+
gen/
14+
doc/
415

516
# Local configuration file (sdk path, etc)
617
local.properties
718

8-
# Log/OS Files
9-
*.log
10-
11-
# Android Studio generated files and folders
12-
captures/
13-
.externalNativeBuild/
14-
.cxx/
15-
*.apk
16-
output.json
19+
# Eclipse project files
20+
.classpath
21+
.project
22+
.settings/
1723

18-
# IntelliJ
19-
*.iml
20-
.idea/
21-
misc.xml
22-
deploymentTargetDropDown.xml
23-
render.experimental.xml
24+
# Keystore
25+
*keystore
2426

25-
# Keystore files
26-
*.jks
27-
*.keystore
27+
# OS X files
28+
.DS_Store
2829

29-
# Google Services (e.g. APIs or Firebase)
30-
google-services.json
30+
# Intellij
31+
.idea/
32+
*.iml
33+
*.iws
3134

32-
# Android Profiling
33-
*.hprof
35+
# Gradle
36+
build
37+
.gradle

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,23 @@
1-
# mparticle-android-integration-rokt
1+
## Rokt Kit Integration
2+
3+
This repository contains the [Rokt](https://docs.rokt.com/) integration for the [mParticle Android SDK](https://github.com/mParticle/mparticle-android-sdk).
4+
5+
### Adding the integration
6+
7+
1. Add the kit dependency to your app's build.gradle:
8+
9+
```groovy
10+
dependencies {
11+
implementation 'com.mparticle:android-rokt-kit:5+'
12+
}
13+
```
14+
2. 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 `"Rokt detected"` in the output of `adb logcat`.
15+
3. Reference mParticle's integration docs below to enable the integration.
16+
17+
### Documentation
18+
19+
[Rokt integration](https://docs.rokt.com/developers/integration-guides/android/overview)
20+
21+
### License
22+
23+
[Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)

build.gradle

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
2+
buildscript {
3+
ext.kotlin_version = '1.7.22'
4+
if (!project.hasProperty('version') || project.version.equals('unspecified')) {
5+
project.version = '+'
6+
}
7+
8+
repositories {
9+
google()
10+
mavenLocal()
11+
mavenCentral()
12+
}
13+
dependencies {
14+
classpath 'com.android.tools.build:gradle:7.4.1'
15+
classpath 'com.mparticle:android-kit-plugin:' + project.version
16+
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10'
17+
}
18+
}
19+
20+
plugins {
21+
id "org.sonarqube" version "3.5.0.2730"
22+
id "org.jlleitschuh.gradle.ktlint" version "11.2.0"
23+
}
24+
25+
sonarqube {
26+
properties {
27+
property "sonar.projectKey", "mparticle-android-integration-button"
28+
property "sonar.organization", "mparticle"
29+
property "sonar.host.url", "https://sonarcloud.io"
30+
}
31+
}
32+
33+
apply plugin: 'org.jlleitschuh.gradle.ktlint'
34+
apply plugin: "kotlin-android"
35+
apply plugin: 'com.mparticle.kit'
36+
37+
android {
38+
defaultConfig {
39+
minSdkVersion 16
40+
consumerProguardFiles 'consumer-proguard.pro'
41+
}
42+
43+
testOptions {
44+
unitTests.returnDefaultValues = true
45+
unitTests.all {
46+
jvmArgs += ['--add-opens', 'java.base/java.lang=ALL-UNNAMED']
47+
jvmArgs += ['--add-opens', 'java.base/java.lang.reflect=ALL-UNNAMED']
48+
}
49+
}
50+
}
51+
52+
dependencies {
53+
implementation 'androidx.annotation:annotation:1.5.0'
54+
api 'com.rokt:roktsdk:4.8.1'
55+
testImplementation 'com.squareup.assertj:assertj-android:1.2.0'
56+
testImplementation ("io.mockk:mockk:1.13.4")
57+
}

consumer-proguard.pro

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# These are the proguard rules specified by the Button SDK's documentation
2+
3+
-keep class com.google.android.gms.ads.identifier.** { *; }
4+
-keep class com.mparticle.kits.ButtonKit { *; }
5+
-keep class com.mparticle.kits.button.** { *; }

gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
android.enableJetifier=true
2+
android.useAndroidX=true
3+
org.gradle.daemon=true
4+
org.gradle.jvmargs=-Xmx2560m

gradle/wrapper/gradle-wrapper.jar

58.4 KB
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)