Skip to content

Commit bcabe5b

Browse files
feat: Update Android Gradle plugin to 8.0.2 (#53)
1 parent 3f3680f commit bcabe5b

5 files changed

Lines changed: 26 additions & 11 deletions

File tree

build.gradle

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.8.10'
2+
ext.kotlin_version = '2.0.20'
33
if (!project.hasProperty('version') || project.version.equals('unspecified')) {
44
project.version = '+'
55
}
@@ -9,16 +9,17 @@ buildscript {
99
mavenLocal()
1010
mavenCentral()
1111
}
12+
1213
dependencies {
13-
classpath 'com.android.tools.build:gradle:7.4.1'
14+
classpath 'com.android.tools.build:gradle:8.1.4'
1415
classpath 'com.mparticle:android-kit-plugin:' + project.version
1516
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1617
}
1718
}
1819

1920
plugins {
2021
id "org.sonarqube" version "3.5.0.2730"
21-
id "org.jlleitschuh.gradle.ktlint" version "11.2.0"
22+
id "org.jlleitschuh.gradle.ktlint" version "13.0.0"
2223
}
2324

2425
sonarqube {
@@ -30,19 +31,31 @@ sonarqube {
3031
}
3132

3233
apply plugin: 'org.jlleitschuh.gradle.ktlint'
33-
apply plugin: 'com.mparticle.kit'
3434
apply plugin: 'kotlin-android'
35+
apply plugin: 'com.mparticle.kit'
3536

3637
android {
3738
namespace 'com.mparticle.kits.revealmobile'
3839
compileSdk 33
39-
lintOptions {
40-
abortOnError false
40+
buildFeatures {
41+
buildConfig = true
4142
}
4243
defaultConfig {
4344
minSdkVersion 16
4445
targetSdk 33
4546
}
47+
compileOptions {
48+
sourceCompatibility JavaVersion.VERSION_17
49+
targetCompatibility JavaVersion.VERSION_17
50+
}
51+
kotlinOptions {
52+
jvmTarget = '17'
53+
}
54+
testOptions {
55+
unitTests.all {
56+
jvmArgs += ['--add-opens', 'java.base/java.lang=ALL-UNNAMED']
57+
}
58+
}
4659
}
4760

4861
repositories {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<manifest />
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"/>

src/main/kotlin/com/mparticle/kits/RevealMobileKit.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import com.stepleaderdigital.reveal.Reveal
88
class RevealMobileKit : KitIntegration() {
99
override fun onKitCreate(
1010
settings: Map<String, String>,
11-
context: Context
11+
context: Context,
1212
): List<ReportingMessage> {
1313
val revealSDK = Reveal.getInstance()
1414
val apiKey = settings[API_KEY]
@@ -31,8 +31,7 @@ class RevealMobileKit : KitIntegration() {
3131

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

34-
35-
companion object{
34+
companion object {
3635
private const val KIT_NAME = "Reveal Mobile"
3736
private const val NO_API_KEY_REQUIRED = "No API Key provided"
3837
private const val SDK_ENDPOINT = "sdk_endpoint"

src/test/kotlin/com/mparticle/kits/RevealMobileKitTest.kt renamed to src/test/kotlin/com/mparticle/kits/RevealMobileKitTests.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ package com.mparticle.kits
22

33
import android.content.Context
44
import com.mparticle.MParticleOptions
5+
import com.mparticle.kits.KitIntegration
6+
import com.mparticle.kits.KitIntegrationFactory
57
import org.junit.Assert
68
import org.junit.Test
79
import org.mockito.Mockito
10+
import java.util.HashMap
811

912
class RevealMobileKitTests {
1013
private val kit: KitIntegration

0 commit comments

Comments
 (0)