Skip to content

Commit 2f20c3e

Browse files
committed
feat: migrate googleanalyticsfirebasega4-kit from submodule to regular directory
1 parent 52cf963 commit 2f20c3e

18 files changed

Lines changed: 2806 additions & 4 deletions

File tree

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@
4040
[submodule "kits/googleanalyticsfirebase-kit"]
4141
path = kits/googleanalyticsfirebase-kit
4242
url = git@github.com:mparticle-integrations/mparticle-android-integration-google-analytics-firebase.git
43-
[submodule "kits/googleanalyticsfirebasega4-kit"]
44-
path = kits/googleanalyticsfirebasega4-kit
45-
url = git@github.com:mparticle-integrations/mparticle-android-integration-google-analytics-firebase-ga4.git
4643
[submodule "kits/iterable-kit"]
4744
path = kits/iterable-kit
4845
url = git@github.com:mparticle-integrations/mparticle-android-integration-iterable.git
Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Firebase for Google Analytics 4 (GA4) Kit Integration
2+
3+
This repository contains the [Firebase for GA4](https://firebase.google.com/docs/analytics/get-started?platform=android) 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-googleanalyticsfirebasega4-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 `"GA4 for Firebase detected"` in the output of `adb logcat`.
15+
3. Reference mParticle's integration docs below to enable the integration.
16+
17+
### Documentation
18+
19+
[Firebase for GA4 integration](http://docs.mparticle.com/integrations/google-analytics-4/event/)
20+
21+
### License
22+
23+
[Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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 'com.google.gms:google-services:4.3.15'
17+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
18+
}
19+
}
20+
21+
plugins {
22+
id "org.sonarqube" version "3.5.0.2730"
23+
id "org.jlleitschuh.gradle.ktlint" version "13.0.0"
24+
}
25+
26+
sonarqube {
27+
properties {
28+
property "sonar.projectKey", "mparticle-android-integration-google-analytics-firebase-ga4"
29+
property "sonar.organization", "mparticle"
30+
property "sonar.host.url", "https://sonarcloud.io"
31+
}
32+
}
33+
34+
apply plugin: 'org.jlleitschuh.gradle.ktlint'
35+
apply plugin: 'kotlin-android'
36+
apply plugin: 'com.mparticle.kit'
37+
38+
android {
39+
namespace 'com.mparticle.kits.googleanalyticsfirebasega4'
40+
buildFeatures {
41+
buildConfig = true
42+
}
43+
defaultConfig {
44+
minSdkVersion 21
45+
}
46+
compileOptions {
47+
sourceCompatibility JavaVersion.VERSION_17
48+
targetCompatibility JavaVersion.VERSION_17
49+
}
50+
kotlinOptions {
51+
jvmTarget = '17'
52+
}
53+
testOptions {
54+
unitTests.all {
55+
jvmArgs += ['--add-opens', 'java.base/java.lang=ALL-UNNAMED']
56+
}
57+
}
58+
}
59+
60+
dependencies {
61+
testImplementation files('libs/java-json.jar')
62+
testImplementation files('libs/test-utils.aar')
63+
testImplementation 'com.google.android.gms:play-services-measurement-api:22.1.0'
64+
65+
compileOnly 'com.google.firebase:firebase-analytics:22.1.0'
66+
}
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
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/googleanalyticsfirebasega4-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)