Skip to content

Commit 790dc05

Browse files
authored
feat: migrate appsflyer-kit from submodule to regular directory (#650)
* feat: migrate appsflyer-kit from submodule to regular directory * feat: relocate appsflyer-kit to kits/appsflyer/appsflyer-6 and update settings-kits.gradle * Add kit lint/ktlint to PR workflow; ignore appsflyer-6 in Trunk Made-with: Cursor * Fix Trunk ignore: use glob patterns for appsflyer-6 and gradlew Made-with: Cursor * feat: remove .gitignore
1 parent 0a188b1 commit 790dc05

22 files changed

Lines changed: 1997 additions & 6 deletions

.github/workflows/pull-request.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ jobs:
195195
java-version: "17"
196196
- name: "Run Android Core SDK Lint"
197197
run: ./gradlew lint
198+
- name: "Setup Android Kit Lint"
199+
run: ./gradlew publishReleaseLocal
200+
- name: "Run Android Kit Lint"
201+
run: ./gradlew -c settings-kits.gradle lint
198202
- name: "Archive Lint Test Results"
199203
uses: actions/upload-artifact@v7
200204
if: always()
@@ -218,6 +222,10 @@ jobs:
218222
java-version: "17"
219223
- name: "Run Android Core SDK Kotlin Lint"
220224
run: ./gradlew ktlintCheck
225+
- name: "Setup Android Kit Kotlin Lint"
226+
run: ./gradlew publishReleaseLocal
227+
- name: "Run Android Kit Kotlin Lint"
228+
run: ./gradlew -c settings-kits.gradle ktlintCheck
221229
- name: "Archive Kotlin Lint Test Results"
222230
uses: actions/upload-artifact@v7
223231
if: always()

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
[submodule "kits/appboy-kit"]
1111
path = kits/appboy-kit
1212
url = git@github.com:mParticle-integrations/mparticle-android-integration-appboy.git
13-
[submodule "kits/appsflyer-kit"]
14-
path = kits/appsflyer-kit
15-
url = git@github.com:mParticle-integrations/mparticle-android-integration-appsflyer.git
1613
[submodule "kits/apptentive-kit"]
1714
path = kits/apptentive-kit
1815
url = git@github.com:mparticle-integrations/mparticle-android-integration-apptentive.git

.trunk/trunk.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ lint:
6565
ignore:
6666
- linters: [ALL]
6767
paths:
68-
- gradlew
68+
- "**/gradlew"
6969
- scripts/install-start-emulator.sh
70+
- kits/appsflyer/appsflyer-6/**
7071
actions:
7172
enabled:
7273
- trunk-announce

kits/appsflyer-kit

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## AppsFlyer Kit Integration
2+
3+
This repository contains the [AppsFlyer](https://www.appsflyer.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-appsflyer-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 `"AppsFlyer detected"` in the output of `adb logcat`.
15+
3. Reference mParticle's integration docs below to enable the integration.
16+
4. If you wish to utilize Appsflyers InstallReferrer capabilities, add a dependency for Play Install Referrer library in you app's build.gradle. For more information visit the [Appsflyer SDK's documentation page](https://support.appsflyer.com/hc/en-us/articles/207032066#attribution) on the subject:
17+
18+
```groovy
19+
dependencies {
20+
implementation "com.android.installreferrer:installreferrer:2.2"
21+
}
22+
```
23+
24+
25+
### Documentation
26+
27+
[AppsFlyer integration](http://docs.mparticle.com/integrations/appsflyer/event/)
28+
29+
### License
30+
31+
[Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)
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+
dependencies {
13+
classpath 'com.android.tools.build:gradle:8.1.4'
14+
classpath 'com.mparticle:android-kit-plugin:' + project.version
15+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
16+
}
17+
}
18+
19+
plugins {
20+
id "org.sonarqube" version "3.5.0.2730"
21+
id "org.jlleitschuh.gradle.ktlint" version "13.0.0"
22+
}
23+
24+
sonarqube {
25+
properties {
26+
property "sonar.projectKey", "mparticle-android-integration-appsflyer"
27+
property "sonar.organization", "mparticle"
28+
property "sonar.host.url", "https://sonarcloud.io"
29+
}
30+
}
31+
32+
apply plugin: 'org.jlleitschuh.gradle.ktlint'
33+
apply plugin: 'kotlin-android'
34+
apply plugin: 'com.mparticle.kit'
35+
36+
android {
37+
namespace 'com.mparticle.kits.appsflyer'
38+
buildFeatures {
39+
buildConfig = true
40+
}
41+
defaultConfig {
42+
minSdkVersion 19
43+
}
44+
compileOptions {
45+
sourceCompatibility JavaVersion.VERSION_17
46+
targetCompatibility JavaVersion.VERSION_17
47+
}
48+
kotlinOptions {
49+
jvmTarget = '17'
50+
}
51+
testOptions {
52+
unitTests.all {
53+
jvmArgs += ['--add-opens', 'java.base/java.lang=ALL-UNNAMED']
54+
}
55+
}
56+
}
57+
58+
ktlint {
59+
android.set(true)
60+
}
61+
62+
dependencies {
63+
api 'com.appsflyer:af-android-sdk:6.17.3'
64+
testImplementation files('libs/java-json.jar')
65+
testImplementation files('libs/testutils.aar')
66+
}
67+
repositories {
68+
mavenCentral()
69+
}

kits/appsflyer/appsflyer-6/consumer-proguard.pro

Whitespace-only changes.
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

0 commit comments

Comments
 (0)