Skip to content

Commit 0ced357

Browse files
authored
feat: add Kotlin sample apps for all integrated kits (#724)
* 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+. * fix(kits): enable vendor Maven repos in sample app builds Add kit-specific repositories and multidex to example apps that need vendor Maven resolution, and drop skip_example_builds for those kits.
1 parent a45f0af commit 0ced357

233 files changed

Lines changed: 3465 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: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
multiDexEnabled true
17+
}
18+
19+
compileOptions {
20+
sourceCompatibility JavaVersion.VERSION_17
21+
targetCompatibility JavaVersion.VERSION_17
22+
}
23+
24+
kotlinOptions {
25+
jvmTarget = '17'
26+
}
27+
28+
buildTypes {
29+
release {
30+
minifyEnabled false
31+
}
32+
}
33+
}
34+
35+
dependencies {
36+
implementation project(':kits:adobe:adobe-5')
37+
implementation 'androidx.appcompat:appcompat:1.6.1'
38+
implementation 'com.google.android.material:material:1.11.0'
39+
implementation 'androidx.multidex:multidex:2.0.1'
40+
}
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 androidx.multidex.MultiDexApplication
4+
import com.mparticle.MPEvent
5+
import com.mparticle.MParticle
6+
import com.mparticle.MParticleOptions
7+
8+
class ExampleApplication : MultiDexApplication() {
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)