Skip to content

Commit 84842a7

Browse files
authored
feat: Migrate Singular 12 kit (#667)
* feat: migrate singular-kit from submodule to regular directory * feat: relocate singular-kit to kits/singular/singular-12 Made-with: Cursor * feat: add singular-12 to settings-kits.gradle Made-with: Cursor
1 parent eebf866 commit 84842a7

20 files changed

Lines changed: 1212 additions & 7 deletions

File tree

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@
3131
[submodule "kits/revealmobile-kit"]
3232
path = kits/revealmobile-kit
3333
url = git@github.com:mparticle-integrations/mparticle-android-integration-revealmobile.git
34-
[submodule "kits/singular-kit"]
35-
path = kits/singular-kit
36-
url = git@github.com:mparticle-integrations/mparticle-android-integration-singular.git
3734
[submodule "kits/skyhook-kit"]
3835
path = kits/skyhook-kit
3936
url = git@github.com:mparticle-integrations/mparticle-android-integration-skyhook.git

.trunk/trunk.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,16 @@ lint:
7575
- kits/apptimize/apptimize-3/**
7676
- kits/braze/braze-38/**
7777
- kits/clevertap/clevertap-7/**
78+
- kits/comscore/comscore-6/**
7879
- kits/iterable/iterable-3/**
7980
- kits/ga/ga-23/**
8081
- kits/ga4/ga4-23/**
8182
- kits/kochava/kochava-5/**
8283
- kits/leanplum/leanplum-7/**
83-
- kits/rokt/rokt/**
8484
- kits/localytics/localytics-6/**
8585
- kits/radar/radar-3/**
8686
- kits/rokt/rokt/**
87-
- kits/comscore/comscore-6/**
87+
- kits/singular/singular-12/**
8888
actions:
8989
enabled:
9090
- trunk-announce

kits/singular-kit

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## Singular Kit Integration
2+
3+
This repository contains the [Singular](https://www.singular.net/) integration for the [mParticle Android SDK](https://github.com/mParticle/mparticle-android-sdk).
4+
5+
### Adding the integration
6+
7+
1. The singular Kit requires that you add singular's Maven server to your buildscript:
8+
9+
```
10+
repositories {
11+
maven { url "https://maven.singular.net"}
12+
...
13+
}
14+
```
15+
16+
1. Add the kit dependency to your app's build.gradle:
17+
18+
```groovy
19+
dependencies {
20+
implementation 'com.mparticle:android-singular-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 `"Singular detected"` in the output of `adb logcat`.
24+
3. Reference mParticle's integration docs below to enable the integration.
25+
26+
### Documentation
27+
28+
[Singular integration](https://docs.mparticle.com/integrations/singular/event/)
29+
30+
### License
31+
32+
[Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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-singular"
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+
repositories {
38+
maven {
39+
url 'https://maven.singular.net'
40+
}
41+
mavenCentral()
42+
}
43+
44+
android {
45+
namespace 'com.mparticle.kits.singular'
46+
buildFeatures {
47+
buildConfig = true
48+
}
49+
defaultConfig {
50+
minSdkVersion 16
51+
}
52+
compileOptions {
53+
sourceCompatibility JavaVersion.VERSION_17
54+
targetCompatibility JavaVersion.VERSION_17
55+
}
56+
kotlinOptions {
57+
jvmTarget = '17'
58+
}
59+
testOptions {
60+
unitTests.all {
61+
jvmArgs += ['--add-opens', 'java.base/java.lang=ALL-UNNAMED']
62+
}
63+
}
64+
}
65+
66+
dependencies {
67+
api 'com.singular.sdk:singular_sdk:12.5.4'
68+
69+
androidTestImplementation 'androidx.test:runner:1.5.2'
70+
testImplementation 'org.powermock:powermock-core:2.0.9'
71+
testImplementation 'org.powermock:powermock-api-mockito2:2.0.2'
72+
testImplementation 'org.powermock:powermock-module-junit4-rule:2.0.9'
73+
testImplementation 'org.powermock:powermock-module-junit4:2.0.9'
74+
testImplementation 'org.powermock:powermock-classloading-xstream:2.0.2'
75+
testImplementation "org.robolectric:robolectric:4.3.1"
76+
testImplementation 'org.json:json:20220320'
77+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# TODO: Add rules to exclude your SDK classes from proguard in implementing apps
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/singular/singular-12/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)