diff --git a/CHANGELOG.md b/CHANGELOG.md index 26cde7b..d19b2ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 0.3.1 (TBD) +## 0.3.1 (2026-07-24) - Removed the unused `androidx.lifecycle:lifecycle-runtime-ktx` dependency. In 0.3.0 this dependency was at version 2.11.0, which forced consumers with any @@ -11,6 +11,12 @@ - Removed the unused `kotlinx-coroutines-android` dependency. The SDK only uses `Dispatchers.IO`, so it does not need the Android `Dispatchers.Main` integration this artifact provides. +- Removed the `androidx.core:core-ktx` dependency. Its only use was the + `SharedPreferences.edit {}` extension, which has been replaced with the + equivalent framework calls. The published artifact now has no `androidx` + dependencies, so it no longer participates in androidx version alignment and + imposes no `compileSdk` or Android Gradle Plugin floor on consumers. + Previously `core-ktx` 1.18.0 required `compileSdk` 36 and AGP 8.9.1. ## 0.3.0 (2026-06-23) diff --git a/README.md b/README.md index 6b35dff..89a343e 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add the dependency to your app's `build.gradle.kts`: ```kotlin dependencies { - implementation("com.maxmind.device:device-sdk:0.3.0") + implementation("com.maxmind.device:device-sdk:0.3.1") } ``` @@ -24,7 +24,7 @@ dependencies { ```groovy dependencies { - implementation 'com.maxmind.device:device-sdk:0.3.0' + implementation 'com.maxmind.device:device-sdk:0.3.1' } ``` @@ -205,11 +205,11 @@ Documentation will be generated in `device-sdk/build/dokka/`. ## License -This software is Copyright (c) 2025 by MaxMind, Inc. +This software is Copyright (c) 2025-2026 by MaxMind, Inc. This is free software, licensed under the [Apache License, Version 2.0](LICENSE-APACHE) or the [MIT License](LICENSE-MIT), -at your option. Copyright 2025 MaxMind, Inc. +at your option. Copyright 2025-2026 MaxMind, Inc. ## Support diff --git a/build.gradle.kts b/build.gradle.kts index 14c14e5..ba265be 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,7 +12,7 @@ plugins { allprojects { group = "com.maxmind.device" - version = "0.3.0" + version = "0.3.1" } tasks.register("clean", Delete::class) { diff --git a/device-sdk/build.gradle.kts b/device-sdk/build.gradle.kts index 738c95e..11ca3d7 100644 --- a/device-sdk/build.gradle.kts +++ b/device-sdk/build.gradle.kts @@ -78,9 +78,6 @@ dependencies { implementation(libs.kotlinx.coroutines.core) implementation(libs.kotlinx.serialization.json) - // AndroidX - implementation(libs.androidx.core.ktx) - // Networking implementation(libs.bundles.ktor) @@ -173,7 +170,7 @@ signing { // API compatibility checking with japicmp // Compares the current build against the latest released version on Maven Central // Update this version after each release (the release script should do this automatically) -val baselineVersion = "0.3.0" +val baselineVersion = "0.3.1" // Download baseline AAR directly from Maven Central to avoid local project resolution val downloadBaselineAar by tasks.registering { diff --git a/device-sdk/src/main/java/com/maxmind/device/storage/StoredIDStorage.kt b/device-sdk/src/main/java/com/maxmind/device/storage/StoredIDStorage.kt index c4f742f..4dc1509 100644 --- a/device-sdk/src/main/java/com/maxmind/device/storage/StoredIDStorage.kt +++ b/device-sdk/src/main/java/com/maxmind/device/storage/StoredIDStorage.kt @@ -2,7 +2,6 @@ package com.maxmind.device.storage import android.content.Context import android.content.SharedPreferences -import androidx.core.content.edit /** * Manages persistent storage of server-generated stored IDs. @@ -33,14 +32,14 @@ internal class StoredIDStorage( * @param id The stored ID to save (format: "{uuid}:{hmac}") */ fun save(id: String) { - prefs.edit { putString(KEY_STORED_ID, id) } + prefs.edit().putString(KEY_STORED_ID, id).apply() } /** * Clears the stored ID. */ fun clear() { - prefs.edit { remove(KEY_STORED_ID) } + prefs.edit().remove(KEY_STORED_ID).apply() } internal companion object { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1d3461d..6b78982 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,7 +11,6 @@ serialization = "1.11.0" # Android androidGradlePlugin = "8.13.1" -androidxCore = "1.18.0" androidxAppCompat = "1.7.1" androidxLifecycle = "2.11.0" @@ -49,7 +48,6 @@ kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutine kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization" } # AndroidX -androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidxCore" } androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidxAppCompat" } androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidxLifecycle" }