Skip to content

Commit 5432939

Browse files
committed
feat: migrate localytics-kit from submodule to regular directory
1 parent 47b3f39 commit 5432939

16 files changed

Lines changed: 872 additions & 4 deletions

File tree

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@
4343
[submodule "kits/leanplum-kit"]
4444
path = kits/leanplum-kit
4545
url = git@github.com:mparticle-integrations/mparticle-android-integration-leanplum.git
46-
[submodule "kits/localytics-kit"]
47-
path = kits/localytics-kit
48-
url = git@github.com:mParticle-integrations/mparticle-android-integration-localytics.git
4946
[submodule "kits/onetrust-kit"]
5047
path = kits/onetrust-kit
5148
url = git@github.com:mparticle-integrations/mparticle-android-integration-onetrust.git

kits/localytics-kit

Lines changed: 0 additions & 1 deletion
This file was deleted.

kits/localytics-kit/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## Localytics Kit Integration
2+
3+
This repository contains the [Localytics](https://www.localytics.com) integration for the [mParticle Android SDK](https://github.com/mParticle/mparticle-android-sdk).
4+
5+
### Adding the integration
6+
7+
1. The Localytics Kit requires that you add Localytics' Maven server to your buildscript:
8+
9+
```
10+
repositories {
11+
maven { url 'https://maven.localytics.com/public' }
12+
...
13+
}
14+
```
15+
16+
2. Add the kit dependency to your app's build.gradle:
17+
18+
```groovy
19+
dependencies {
20+
implementation 'com.mparticle:android-localytics-kit:5+'
21+
}
22+
```
23+
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 `"Localytics detected"` in the output of `adb logcat`.
24+
3. Reference mParticle's integration docs below to enable the integration.
25+
26+
### Documentation
27+
28+
[Localytics integration](https://docs.mparticle.com/integrations/localytics/event/)
29+
30+
### License
31+
32+
[Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)

kits/localytics-kit/build.gradle

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
buildscript {
2+
ext.kotlin_version = '2.0.20'
3+
if (!project.hasProperty('version') || project.version.equals('unspecified')) {
4+
project.version = '+'
5+
}
6+
7+
repositories {
8+
google()
9+
mavenLocal()
10+
mavenCentral()
11+
}
12+
13+
dependencies {
14+
classpath 'com.android.tools.build:gradle:8.1.4'
15+
classpath 'com.mparticle:android-kit-plugin:' + project.version
16+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
17+
}
18+
}
19+
20+
plugins {
21+
id "org.sonarqube" version "3.5.0.2730"
22+
id "org.jlleitschuh.gradle.ktlint" version "13.0.0"
23+
}
24+
25+
sonarqube {
26+
properties {
27+
property "sonar.projectKey", "mparticle-android-integration-localytics"
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+
namespace 'com.mparticle.kits.localytics'
39+
compileSdk 33
40+
buildFeatures {
41+
buildConfig = true
42+
}
43+
defaultConfig {
44+
minSdkVersion 21
45+
targetSdk 33
46+
}
47+
compileOptions {
48+
sourceCompatibility JavaVersion.VERSION_17
49+
targetCompatibility JavaVersion.VERSION_17
50+
}
51+
kotlinOptions {
52+
jvmTarget = '17'
53+
}
54+
testOptions {
55+
unitTests.all {
56+
jvmArgs += ['--add-opens', 'java.base/java.lang=ALL-UNNAMED']
57+
}
58+
}
59+
}
60+
repositories {
61+
maven { url 'https://maven.localytics.com/public' }
62+
mavenCentral()
63+
}
64+
65+
dependencies {
66+
api 'com.localytics.androidx:library:6.3.7'
67+
compileOnly 'androidx.appcompat:appcompat:1.6.1'
68+
testImplementation files('libs/java-json.jar')
69+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# These are the proguard rules specified by the Localyticd SDK's documentation
2+
3+
-keep class com.localytics.android.** { *; }
4+
-keepattributes JavascriptInterface
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
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-8.0.2-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

kits/localytics-kit/gradlew

Lines changed: 234 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)