Skip to content
Merged
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
25 changes: 19 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.8.10'
ext.kotlin_version = '2.0.20'
if (!project.hasProperty('version') || project.version.equals('unspecified')) {
project.version = '+'
}
Expand All @@ -9,16 +9,17 @@ buildscript {
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 @@ -30,19 +31,31 @@ sonarqube {
}

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

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

repositories {
Expand Down
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
2 changes: 1 addition & 1 deletion src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<manifest />
<manifest xmlns:android="http://schemas.android.com/apk/res/android"/>
5 changes: 2 additions & 3 deletions src/main/kotlin/com/mparticle/kits/RevealMobileKit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import com.stepleaderdigital.reveal.Reveal
class RevealMobileKit : KitIntegration() {
override fun onKitCreate(
settings: Map<String, String>,
context: Context
context: Context,
): List<ReportingMessage> {
val revealSDK = Reveal.getInstance()
val apiKey = settings[API_KEY]
Expand All @@ -31,8 +31,7 @@ class RevealMobileKit : KitIntegration() {

override fun setOptOut(optedOut: Boolean): List<ReportingMessage> = emptyList()


companion object{
companion object {
private const val KIT_NAME = "Reveal Mobile"
private const val NO_API_KEY_REQUIRED = "No API Key provided"
private const val SDK_ENDPOINT = "sdk_endpoint"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ package com.mparticle.kits

import android.content.Context
import com.mparticle.MParticleOptions
import com.mparticle.kits.KitIntegration
import com.mparticle.kits.KitIntegrationFactory
import org.junit.Assert
import org.junit.Test
import org.mockito.Mockito
import java.util.HashMap

class RevealMobileKitTests {
private val kit: KitIntegration
Expand Down