Skip to content

Commit b001158

Browse files
committed
feat(kits): add Kotlin sample apps for all integrated kits
Replicate the Adjust example-app pattern across every kit in settings-kits.gradle, wire them in settings-kit-examples.gradle and kits/matrix.json, and add a generator script. Skip CI example builds for kits that need custom Maven repos or AGP 8.6+.
1 parent a45f0af commit b001158

234 files changed

Lines changed: 3764 additions & 3 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

kits/adjust/adjust-5/example/example-kotlin/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ plugins {
55

66
android {
77
namespace 'com.mparticle.kits.adjust.example.kotlin'
8-
compileSdk 34
8+
compileSdk 35
99

1010
defaultConfig {
1111
applicationId 'com.mparticle.kits.adjust.example.kotlin'
1212
minSdk 21
13-
targetSdk 34
13+
targetSdk 35
1414
versionCode 1
1515
versionName '1.0'
1616
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
plugins {
2+
id 'com.android.application'
3+
id 'org.jetbrains.kotlin.android'
4+
}
5+
6+
android {
7+
namespace 'com.mparticle.kits.adobe.example.kotlin'
8+
compileSdk 35
9+
10+
defaultConfig {
11+
applicationId 'com.mparticle.kits.adobe.example.kotlin'
12+
minSdk 16
13+
targetSdk 35
14+
versionCode 1
15+
versionName '1.0'
16+
}
17+
18+
compileOptions {
19+
sourceCompatibility JavaVersion.VERSION_17
20+
targetCompatibility JavaVersion.VERSION_17
21+
}
22+
23+
kotlinOptions {
24+
jvmTarget = '17'
25+
}
26+
27+
buildTypes {
28+
release {
29+
minifyEnabled false
30+
}
31+
}
32+
}
33+
34+
dependencies {
35+
implementation project(':kits:adobe:adobe-5')
36+
implementation 'androidx.appcompat:appcompat:1.6.1'
37+
implementation 'com.google.android.material:material:1.11.0'
38+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3+
4+
<application
5+
android:name=".ExampleApplication"
6+
android:allowBackup="true"
7+
android:icon="@mipmap/ic_launcher"
8+
android:label="@string/app_name"
9+
android:roundIcon="@mipmap/ic_launcher_round"
10+
android:supportsRtl="true"
11+
android:theme="@style/Theme.AppCompat.Light.DarkActionBar">
12+
<activity
13+
android:name=".MainActivity"
14+
android:exported="true">
15+
<intent-filter>
16+
<action android:name="android.intent.action.MAIN" />
17+
<category android:name="android.intent.category.LAUNCHER" />
18+
</intent-filter>
19+
</activity>
20+
</application>
21+
22+
</manifest>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.mparticle.kits.adobe.example.kotlin
2+
3+
import android.app.Application
4+
import com.mparticle.MPEvent
5+
import com.mparticle.MParticle
6+
import com.mparticle.MParticleOptions
7+
8+
class ExampleApplication : Application() {
9+
override fun onCreate() {
10+
super.onCreate()
11+
val options =
12+
MParticleOptions
13+
.builder(this)
14+
.credentials(
15+
"REPLACE WITH YOUR MPARTICLE API KEY",
16+
"REPLACE WITH YOUR MPARTICLE API SECRET",
17+
).logLevel(MParticle.LogLevel.VERBOSE)
18+
.build()
19+
MParticle.start(options)
20+
MParticle.getInstance()?.logEvent(
21+
MPEvent.Builder("foo", MParticle.EventType.Other).build(),
22+
)
23+
}
24+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.mparticle.kits.adobe.example.kotlin
2+
3+
import android.os.Bundle
4+
import androidx.appcompat.app.AppCompatActivity
5+
6+
class MainActivity : AppCompatActivity() {
7+
override fun onCreate(savedInstanceState: Bundle?) {
8+
super.onCreate(savedInstanceState)
9+
setContentView(R.layout.activity_main)
10+
}
11+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="108dp"
3+
android:height="108dp"
4+
android:viewportWidth="108"
5+
android:viewportHeight="108">
6+
<path
7+
android:fillColor="#3DDC84"
8+
android:pathData="M0,0h108v108h-108z" />
9+
<path
10+
android:fillColor="#00000000"
11+
android:pathData="M9,0L9,108"
12+
android:strokeWidth="0.8"
13+
android:strokeColor="#33FFFFFF" />
14+
</vector>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
android:gravity="center"
6+
android:orientation="vertical"
7+
android:padding="16dp">
8+
9+
<TextView
10+
android:layout_width="wrap_content"
11+
android:layout_height="wrap_content"
12+
android:text="@string/app_name" />
13+
14+
</LinearLayout>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/ic_launcher_background" />
4+
<foreground android:drawable="@drawable/ic_launcher_foreground" />
5+
</adaptive-icon>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/ic_launcher_background" />
4+
<foreground android:drawable="@drawable/ic_launcher_foreground" />
5+
</adaptive-icon>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="ic_launcher_background">#FFFFFF</color>
4+
</resources>

0 commit comments

Comments
 (0)