Skip to content
Closed
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: 2 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
cache-dependency-path: yarn.lock
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Ensure jq is available
run: command -v jq >/dev/null || (sudo apt-get update && sudo apt-get install -y jq)
- name: Trunk Check
uses: trunk-io/trunk-action@v1

Expand Down
4 changes: 4 additions & 0 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ lint:
- linters: [markdownlint]
paths:
- CHANGELOG.md # Standard changelog format violates MD001, MD024, MD025
- linters: [shellcheck, shfmt]
paths:
- android/gradlew
- sample/android/gradlew # Vendored, regenerated verbatim by `gradle wrapper` — not hand-maintained
actions:
enabled:
- trunk-announce
Expand Down
4 changes: 3 additions & 1 deletion MIGRATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ implementation "com.mparticle:android-rokt-kit:[6.0.0, 7.0)"
```

`android-rokt-kit` requires `compileSdk` 35+ and Android Gradle Plugin 8.6+.
With the Expo config plugin, list the kit in `androidKits` instead. This wrapper
This wrapper itself now compiles against `compileSdk` 37, so that's the
effective floor for consuming apps regardless of the kit. With the Expo
config plugin, list the kit in `androidKits` instead. This wrapper
declares `android-core` as `[6.0.1, 7.0)`, so core resolves `6.0.1` or newer
regardless; the kit is `compileOnly` here, so its version is entirely yours to
choose.
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,10 @@ For Android Rokt integrations, including `MParticle.Rokt.*` APIs and
`RoktLayoutView`, `android-core` and `android-rokt-kit` `6.0.1` or newer are
required — that is the range this library compiles against. Apps that include
`android-rokt-kit` must build with `compileSdk` 35+ and Android Gradle Plugin
8.6+. Android CNAME setup through `customBaseUrl` also requires `android-core`
`6.0.1` or newer.
8.6+. Since this library itself now compiles against `compileSdk` 37, that
higher floor applies regardless of whether `android-rokt-kit` is included —
consuming apps need `compileSdk` 37+. Android CNAME setup through
`customBaseUrl` also requires `android-core` `6.0.1` or newer.

See [Identity](http://docs.mparticle.com/developers/sdk/ios/identity/) for more information on supplying an `MPIdentityApiRequest` object during SDK initialization.

Expand Down
44 changes: 23 additions & 21 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
buildscript {
ext.kotlin_version = "2.1.0"
ext.kotlin_version = "2.4.10"
repositories {
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.4'
classpath 'com.android.tools.build:gradle:9.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down Expand Up @@ -43,7 +43,14 @@ def supportsNamespace() {

apply plugin: 'org.jlleitschuh.gradle.ktlint'
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
// AGP 9 ships built-in Kotlin support and registers the `kotlin` extension
// itself. Applying the Kotlin plugin on top of it fails configuration with
// "Cannot add extension with name 'kotlin'". Only apply it when nothing has
// registered that extension yet.
if (project.extensions.findByName('kotlin') == null) {
apply plugin: 'kotlin-android'
}

if (isNewArchitectureEnabled()) {
apply plugin: 'com.facebook.react'
}
Expand All @@ -60,11 +67,11 @@ android {
}
}
}
compileSdkVersion 33
compileSdkVersion 37

defaultConfig {
minSdkVersion 21
targetSdkVersion 33
targetSdkVersion 37
versionCode 2
versionName "2.0.0"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
Expand All @@ -73,8 +80,10 @@ android {
main {
if (isNewArchitectureEnabled()) {
java.srcDirs += ['src/newarch/java']
kotlin.srcDirs += ['src/newarch/java']
} else {
java.srcDirs += ['src/oldarch/java']
kotlin.srcDirs += ['src/oldarch/java']
}
}
}
Expand All @@ -84,20 +93,24 @@ android {
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '17'
}
buildTypes {
release {
minifyEnabled false
}
}
adbOptions {
timeOutInMs 10 * 60 * 1000
installOptions "-d","-t"
}
}

// Kotlin Gradle Plugin 2.x removed the `android.kotlinOptions` DSL in favor of
// this top-level block.
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}

repositories {
mavenCentral()
google()
Expand Down Expand Up @@ -126,7 +139,7 @@ dependencies {
//
// compile 'com.mparticle:android-example-kit:REPLACEME'
//
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.6.1"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.11.0"

testImplementation 'org.mockito:mockito-core:5.23.0'
androidTestImplementation 'org.mockito:mockito-android:5.23.0'
Expand All @@ -139,14 +152,3 @@ dependencies {
testCompileOnly 'com.mparticle:android-rokt-kit:6.0.4'
testImplementation("com.facebook.react:react-android:+")
}

configurations.all {
resolutionStrategy {
// mockito 5.23.0 pulls byte-buddy 1.17.7, which ships a META-INF/versions/24
// multi-release overlay that this AGP's Jetifier can't parse ("Unsupported
// class file major version 68"). 1.15.x is the last line without that overlay
// and is still API-compatible with mockito's usage.
force 'net.bytebuddy:byte-buddy:1.15.11'
force 'net.bytebuddy:byte-buddy-agent:1.15.11'
}
}
8 changes: 6 additions & 2 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,9 @@ org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=512m
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true

# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Automatically convert third-party libraries to use AndroidX. Deprecated
# and defaults to false as of AGP 9 (removed entirely in AGP 10) — every
# dependency in this project is already AndroidX-native, so this was already
# a no-op, and leaving it on was the only thing making Jetifier try (and
# fail) to parse newer transitive jars like byte-buddy's Java-24 class files.
android.enableJetifier=false
Binary file modified android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-all.zip
Loading
Loading