chore: upgrade to Kotlin 2.1.10, AGP 8.9.1, compileSdk 36, minSdk 23#460
Open
marandaneto wants to merge 11 commits intomainfrom
Open
chore: upgrade to Kotlin 2.1.10, AGP 8.9.1, compileSdk 36, minSdk 23#460marandaneto wants to merge 11 commits intomainfrom
marandaneto wants to merge 11 commits intomainfrom
Conversation
…s via gradle.properties
Contributor
posthog-android Compliance ReportDate: 2026-03-18 16:51:11 UTC
|
| Test | Status | Duration |
|---|---|---|
| Format Validation.Event Has Required Fields | ✅ | 2312ms |
| Format Validation.Event Has Uuid | ✅ | 2029ms |
| Format Validation.Event Has Lib Properties | ✅ | 2026ms |
| Format Validation.Distinct Id Is String | ✅ | 2024ms |
| Format Validation.Token Is Present | ✅ | 2022ms |
| Format Validation.Custom Properties Preserved | ✅ | 2022ms |
| Format Validation.Event Has Timestamp | ✅ | 2021ms |
| Retry Behavior.Retries On 503 | ✅ | 7023ms |
| Retry Behavior.Does Not Retry On 400 | ✅ | 4024ms |
| Retry Behavior.Does Not Retry On 401 | ✅ | 4023ms |
| Retry Behavior.Respects Retry After Header | ✅ | 7026ms |
| Retry Behavior.Implements Backoff | ✅ | 17022ms |
| Retry Behavior.Retries On 500 | ✅ | 7023ms |
| Retry Behavior.Retries On 502 | ✅ | 7027ms |
| Retry Behavior.Retries On 504 | ✅ | 7021ms |
| Retry Behavior.Max Retries Respected | ✅ | 17035ms |
| Deduplication.Generates Unique Uuids | ✅ | 2041ms |
| Deduplication.Preserves Uuid On Retry | ✅ | 7025ms |
| Deduplication.Preserves Uuid And Timestamp On Retry | ✅ | 12033ms |
| Deduplication.Preserves Uuid And Timestamp On Batch Retry | ✅ | 7031ms |
| Deduplication.No Duplicate Events In Batch | ✅ | 2033ms |
| Deduplication.Different Events Have Different Uuids | ✅ | 2027ms |
| Compression.Sends Gzip When Enabled | ✅ | 2022ms |
| Batch Format.Uses Proper Batch Structure | ✅ | 2018ms |
| Batch Format.Flush With No Events Sends Nothing | ✅ | 2014ms |
| Batch Format.Multiple Events Batched Together | ✅ | 2027ms |
| Error Handling.Does Not Retry On 403 | ✅ | 4021ms |
| Error Handling.Does Not Retry On 413 | ❌ | 4021ms |
| Error Handling.Retries On 408 | ✅ | 7021ms |
Failures
error_handling.does_not_retry_on_413
Expected 1 requests, got 2
The 'capture with appendFeatureFlags uses local evaluation' test was failing on CI because the 100ms timeout for collecting subsequent MockWebServer requests was too short for slower CI machines. Increased to 2 seconds to allow enough time for all requests to arrive.
b156f2c to
142b36c
Compare
dustinbyrne
reviewed
Mar 19, 2026
Comment on lines
27
to
-69
| @@ -66,7 +66,7 @@ public sealed interface PostHogInterface { | |||
| /** | |||
| * Enables or disables the debug mode | |||
| */ | |||
| public fun debug(enable: Boolean = true) | |||
Contributor
There was a problem hiding this comment.
This looks like it's not backward compatible
|
|
||
| <issue | ||
| id="NewApi" | ||
| message="Call requires API level 24 (current min is 23): `android.graphics.drawable.GradientDrawable#getColors`" |
Contributor
There was a problem hiding this comment.
On SDK 23, will this degrade gracefully?
| val ANIMAL_SNIFFER = "1.7.1" | ||
| val ANIMAL_SNIFFER_SDK_VERSION = "5.0.1_r2" // API 21 | ||
| val ANIMAL_SNIFFER = "1.7.2" | ||
| val ANIMAL_SNIFFER_SDK_VERSION = "6.0_r3" // API 23 |
Contributor
There was a problem hiding this comment.
Does this mean we can finally get Integer.hashCode? 🙏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 Motivation and Context
Upgrade the Android SDK build toolchain to modern versions:
Also upgrades dependencies: OkHttp 4.12.0, Robolectric 4.14.1, Dokka 1.9.20, Kover 0.9.0, binary-compatibility-validator 0.16.3, build-config plugin 5.5.1, and others.
Inspiration: PostHog/posthog-flutter#245
Key code changes required by the upgrades
kotlinCompilerExtensionVersiontokotlin("plugin.compose")plugin (Kotlin 2.0+ approach)PostHogInterface.identify()andPostHogInterface.debug()(the implementing classes still provide defaults)@Suppress("DEPRECATION")for GsonJsonParser()usage inPostHogSerializerPostHogReplayIntegration,PostHogLogCatIntegration)activeNetwork/getNetworkCapabilitiespathgradle.propertiesas single source of truth (consumed bybuildSrc,PosthogBuildConfig, and the Gradle plugin)sdk_compliance_adapterDockerfile and build to use shared versionsCI fix
PostHogTest.capture with appendFeatureFlags uses local evaluationtest by increasing MockWebServertakeRequesttimeout from 100ms to 2s (too short for slower CI runners)💚 How did you test it?
make compile✅make test(all JVM + Android unit tests) ✅make checkFormat✅📝 Checklist