Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 3 additions & 0 deletions runtime-batching-kit/batching-kit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ android {
consumerProguardFiles "consumer-rules.pro"
}

buildFeatures {
buildConfig = true
}
buildTypes {
release {
minifyEnabled false
Expand Down
32 changes: 29 additions & 3 deletions simple-kit/build.gradle
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@

buildscript {
ext.kotlin_version = '2.0.20'
if (!project.hasProperty('version') || project.version.equals('unspecified')) {
project.version = '+'
}

repositories {
google()
mavenLocal()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.4.1'
classpath 'com.android.tools.build:gradle:8.1.4'
classpath 'com.mparticle:android-kit-plugin:' + project.version
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

plugins {
id "org.sonarqube" version "3.5.0.2730"
id "org.jlleitschuh.gradle.ktlint" version "11.2.0"
id "org.jlleitschuh.gradle.ktlint" version "13.0.0"
}

sonarqube {
Expand All @@ -28,8 +31,31 @@ sonarqube {
}

apply plugin: 'org.jlleitschuh.gradle.ktlint'
apply plugin: 'kotlin-android'
apply plugin: 'com.mparticle.kit'

android {
namespace 'com.mparticle.kits.example'
defaultConfig {
minSdkVersion 21
}
buildFeatures {
buildConfig = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
testOptions {
unitTests.all {
jvmArgs += ['--add-opens', 'java.base/java.lang=ALL-UNNAMED']
}
}
}

dependencies {
//TODO: Option 1: Replace with your Maven Central Dependency (preferred)
//compile 'com.example:example-artifact:1.2.3'
Expand Down
2 changes: 1 addition & 1 deletion simple-kit/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<!-- Change 'example' below to your company name, and delete this comment. -->
<manifest package="com.mparticle.kits.example"/>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"/>
25 changes: 12 additions & 13 deletions simple-kit/src/main/kotlin/com/mparticle/kits/ExampleKit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ import android.content.Context
* - ./consumer-proguard.pro
*/
class ExampleKit : KitIntegration() {

public override fun onKitCreate(
settings: MutableMap<String, String>?,
context: Context?
context: Context?,
): MutableList<ReportingMessage>? {
/** TODO: Initialize your SDK here
* This method is analogous to Application#onCreate, and will be called once per app execution.
Expand All @@ -40,20 +39,20 @@ class ExampleKit : KitIntegration() {
}

override fun getName(): String {
//TODO: Replace this with your company name
// TODO: Replace this with your company name
return "Example"
}


override fun setOptOut(optedOut: Boolean): MutableList<ReportingMessage>? {
//TODO: Disable or enable your SDK when a user opts out.
//TODO: If your SDK can not be opted out of, return null
val optOutMessage = ReportingMessage(
this,
ReportingMessage.MessageType.OPT_OUT,
System.currentTimeMillis(),
null
)
// TODO: Disable or enable your SDK when a user opts out.
// TODO: If your SDK can not be opted out of, return null
val optOutMessage =
ReportingMessage(
this,
ReportingMessage.MessageType.OPT_OUT,
System.currentTimeMillis(),
null,
)
return null
}
}
}
2 changes: 1 addition & 1 deletion simple-kit/src/test/kotlin/com/mparticle/kits/KitTests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class KitTests {
var e: Exception? = null
try {
val kit = kit
val settings= HashMap<String, String>()
val settings = HashMap<String, String>()
settings["fake setting"] = "fake"
kit.onKitCreate(settings, Mockito.mock(Context::class.java))
} catch (ex: Exception) {
Expand Down
Loading