diff --git a/CHANGELOG.md b/CHANGELOG.md index 839a79e..4a3e3e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 0.3.0 (TBD) +## 0.3.0 (2026-06-23) - Lowered the minimum supported Android API level from 29 (Android 10) to 27 (Android 8.1). Device data collection on API 27 and 28 falls back to diff --git a/README.md b/README.md index ba6e543..6b35dff 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Android SDK for collecting and reporting device data to MaxMind. ## Requirements - Android API 27+ (Android 8.1+) -- Kotlin 2.2.21+ +- A recent stable version of Kotlin - AndroidX libraries ## Installation @@ -16,7 +16,7 @@ Add the dependency to your app's `build.gradle.kts`: ```kotlin dependencies { - implementation("com.maxmind.device:device-sdk:0.2.0") + implementation("com.maxmind.device:device-sdk:0.3.0") } ``` @@ -24,7 +24,7 @@ dependencies { ```groovy dependencies { - implementation 'com.maxmind.device:device-sdk:0.2.0' + implementation 'com.maxmind.device:device-sdk:0.3.0' } ``` diff --git a/SETUP.md b/SETUP.md index f765a57..7283b35 100644 --- a/SETUP.md +++ b/SETUP.md @@ -2,40 +2,50 @@ ## Prerequisites -- Java 17+ (Android Studio includes JDK 21) -- Android SDK with API 34 -- Gradle 8.5+ (included via wrapper) +- Java (the required version is pinned in `mise.toml`) +- Android SDK (install the platform and build-tools matching the `compileSdk` in + `gradle/libs.versions.toml`) +- Gradle (included via the wrapper) ## Initial Setup ### 1. Install Android SDK -#### Option A: Using Android Studio (Recommended) +#### Option A: Using mise (Recommended) + +[mise](https://mise.jdx.dev/) reads `mise.toml` and installs the toolchain at +the versions this project expects, so you don't have to track them by hand: + +```bash +mise install # Installs Java, the Android SDK command-line tools, etc. +mise run setup # Accepts licenses, installs platform packages, writes local.properties +``` + +This also creates `local.properties`, so you can skip step 2 below. + +#### Option B: Using Android Studio 1. Open Android Studio 2. Navigate to **Tools → SDK Manager** -3. Install the following components: - - **SDK Platforms**: Android 14.0 (API 34) - - **SDK Tools**: - - Android SDK Build-Tools 34 - - Android SDK Command-line Tools - - Android SDK Platform-Tools +3. Install the platform and build-tools matching the `compileSdk` in + `gradle/libs.versions.toml`, plus the Command-line Tools and Platform-Tools 4. Accept all licenses when prompted 5. Note the SDK location path (shown at top of SDK Manager) -#### Option B: Command Line +#### Option C: Command Line ```bash -# Download command-line tools +# Download the latest command-line tools ("Command line tools only") from +# https://developer.android.com/studio and unpack them: mkdir -p ~/Android/Sdk/cmdline-tools cd ~/Android/Sdk/cmdline-tools -wget https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip -unzip commandlinetools-linux-9477386_latest.zip +unzip ~/Downloads/commandlinetools-linux-*.zip mv cmdline-tools latest -# Accept licenses and install components +# Accept licenses, then install the platform and build-tools for the project's +# compileSdk (see gradle/libs.versions.toml). For example, if compileSdk = 36: ~/Android/Sdk/cmdline-tools/latest/bin/sdkmanager --licenses -~/Android/Sdk/cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-34" "build-tools;34.0.0" +~/Android/Sdk/cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-36" "build-tools;36.0.0" ``` ### 2. Configure SDK Location diff --git a/build.gradle.kts b/build.gradle.kts index 3cd1ced..14c14e5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,7 +12,7 @@ plugins { allprojects { group = "com.maxmind.device" - version = "0.2.0" + version = "0.3.0" } tasks.register("clean", Delete::class) { diff --git a/device-sdk/build.gradle.kts b/device-sdk/build.gradle.kts index 87f4d9b..b02263e 100644 --- a/device-sdk/build.gradle.kts +++ b/device-sdk/build.gradle.kts @@ -175,7 +175,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.2.0" +val baselineVersion = "0.3.0" // Download baseline AAR directly from Maven Central to avoid local project resolution val downloadBaselineAar by tasks.registering { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 11459a1..1dec128 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,18 +5,18 @@ targetSdk = "36" compileSdk = "36" # Core dependencies -kotlin = "2.2.21" -coroutines = "1.10.2" -serialization = "1.10.0" +kotlin = "2.3.21" +coroutines = "1.11.0" +serialization = "1.11.0" # Android androidGradlePlugin = "8.13.1" androidxCore = "1.18.0" androidxAppCompat = "1.7.1" -androidxLifecycle = "2.10.0" +androidxLifecycle = "2.11.0" # Networking -ktor = "3.4.2" +ktor = "3.5.0" # Code quality detekt = "1.23.8" @@ -27,9 +27,9 @@ dokka = "2.2.0" # Testing junit = "4.13.2" -junitJupiter = "6.0.1" -junitPlatform = "6.0.1" -mockk = "1.14.9" +junitJupiter = "6.1.0" +junitPlatform = "6.1.0" +mockk = "1.14.11" androidxTestCore = "1.7.0" androidxTestRunner = "1.7.0" androidxTestJunit = "1.3.0" @@ -37,11 +37,11 @@ robolectric = "4.16.1" turbine = "1.2.1" # Material (for sample app) -material = "1.12.0" +material = "1.14.0" # Publishing -mavenPublish = "0.36.0" -dependencyUpdates = "0.53.0" +mavenPublish = "0.37.0" +dependencyUpdates = "0.54.0" [libraries] # Kotlin