From 19409ea0b21d850c71b29b165a27241a6a9d6d32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Brey?= Date: Thu, 27 Aug 2026 11:16:21 +0200 Subject: [PATCH 1/6] docs: state the minimum Kotlin version purchases-android v11 publishes kotlin-stdlib 2.2.21 at compile scope, so its metadata is 2.2.0 and a compiler older than 2.1 cannot read it. Flutter applies the app's own Kotlin Gradle Plugin version to plugin subprojects, so the requirement lands on the consuming app. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index debfc6c49..554a86574 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ To use this plugin, add `purchases_flutter` as a [dependency in your pubspec.yaml file](https://flutter.io/platform-plugins/). ### Requirements -*purchases_flutter* requires Xcode 14.0+ and minimum targets iOS 13.0+/Android SDK 21+ (Android 5.0+). +*purchases_flutter* requires Xcode 14.0+, Kotlin 2.1.0+, and minimum targets iOS 13.0+/Android SDK 21+ (Android 5.0+). ## SDK Reference Our full SDK reference [can be found here](https://pub.dev/documentation/purchases_flutter/latest/). From a7872d10f519e80afc6006044c633574f89b2367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Brey?= Date: Mon, 31 Aug 2026 15:58:28 +0200 Subject: [PATCH 2/6] build(purchases_ui_flutter): raise Kotlin to 2.2.21 purchases-android v11 publishes stdlib metadata 2.2.0. Kotlin 1.9.20 rejects it with "The binary version of its metadata is 2.2.0, expected version is 1.9.0", so this module could not compile against v11 at all. --- purchases_ui_flutter/android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/purchases_ui_flutter/android/build.gradle b/purchases_ui_flutter/android/build.gradle index b4587af3c..11994fc2a 100644 --- a/purchases_ui_flutter/android/build.gradle +++ b/purchases_ui_flutter/android/build.gradle @@ -2,7 +2,7 @@ group 'com.revenuecat.purchases_ui_flutter' version '10.13.2' buildscript { - ext.kotlin_version = '1.9.20' + ext.kotlin_version = '2.2.21' ext.common_version = '19.3.1' repositories { google() From 66ac259a5bdb374dcd6ab799ac12674b47b2af14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Brey?= Date: Mon, 31 Aug 2026 15:58:28 +0200 Subject: [PATCH 3/6] build: temporarily build purchases_ui_flutter against the v11 snapshot Scaffolding to prove the Kotlin bump against real v11 artifacts before release. Revert both the snapshot repository and the two pins before merging. --- purchases_ui_flutter/android/build.gradle | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/purchases_ui_flutter/android/build.gradle b/purchases_ui_flutter/android/build.gradle index 11994fc2a..51298a8af 100644 --- a/purchases_ui_flutter/android/build.gradle +++ b/purchases_ui_flutter/android/build.gradle @@ -19,6 +19,11 @@ allprojects { repositories { google() mavenCentral() + // TODO: remove with the purchases 11.0.0-SNAPSHOT pin below, before merging. + maven { + url 'https://central.sonatype.com/repository/maven-snapshots/' + content { includeGroup 'com.revenuecat.purchases' } + } } } @@ -57,6 +62,10 @@ android { dependencies { implementation "com.revenuecat.purchases:purchases-hybrid-common-ui:$common_version" implementation 'androidx.compose.ui:ui-android:1.5.4' + // TODO: remove before merging. Forces the transitive purchases-android up to the v11 + // snapshot so this module compiles against Kotlin metadata 2.2.0. + implementation 'com.revenuecat.purchases:purchases:11.0.0-SNAPSHOT' + implementation 'com.revenuecat.purchases:purchases-ui:11.0.0-SNAPSHOT' } } From 83fedd801c8c29c418cbea9ea69499621cea2cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Brey?= Date: Mon, 31 Aug 2026 16:11:00 +0200 Subject: [PATCH 4/6] build: raise the example apps' Kotlin to 2.2.21 The apps compile their own MainActivity against purchases-android transitively, so a 1.8.22 compiler cannot read v11's metadata either. --- e2e-tests/MaestroTestApp/android/settings.gradle.kts | 2 +- revenuecat_examples/purchase_tester/android/settings.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e-tests/MaestroTestApp/android/settings.gradle.kts b/e2e-tests/MaestroTestApp/android/settings.gradle.kts index dfed58e1a..a310ef664 100644 --- a/e2e-tests/MaestroTestApp/android/settings.gradle.kts +++ b/e2e-tests/MaestroTestApp/android/settings.gradle.kts @@ -20,7 +20,7 @@ pluginManagement { plugins { id("dev.flutter.flutter-plugin-loader") version "1.0.0" id("com.android.application") version "8.13.2" apply false - id("org.jetbrains.kotlin.android") version "1.8.22" apply false + id("org.jetbrains.kotlin.android") version "2.2.21" apply false } include(":app") diff --git a/revenuecat_examples/purchase_tester/android/settings.gradle b/revenuecat_examples/purchase_tester/android/settings.gradle index 64a1cf28c..721fe246b 100644 --- a/revenuecat_examples/purchase_tester/android/settings.gradle +++ b/revenuecat_examples/purchase_tester/android/settings.gradle @@ -20,7 +20,7 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" id "com.android.application" version "8.13.2" apply false - id "org.jetbrains.kotlin.android" version "1.8.22" apply false + id "org.jetbrains.kotlin.android" version "2.2.21" apply false } include ":app" From e3a03b794d8ad8f7cd9efcbc77ed5d02e5f48509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Brey?= Date: Mon, 31 Aug 2026 16:11:12 +0200 Subject: [PATCH 5/6] build: temporarily resolve the v11 snapshot in the example app builds Flutter builds the plugin as a subproject of the app, so the app's repositories decide resolution, not the plugin's. Revert with the pins in purchases_ui_flutter. --- api_tester/android/build.gradle.kts | 5 +++++ e2e-tests/MaestroTestApp/android/build.gradle.kts | 5 +++++ e2e-tests/agp9_test_app/android/build.gradle.kts | 5 +++++ revenuecat_examples/purchase_tester/android/build.gradle | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/api_tester/android/build.gradle.kts b/api_tester/android/build.gradle.kts index 89176ef44..96e36d3b7 100644 --- a/api_tester/android/build.gradle.kts +++ b/api_tester/android/build.gradle.kts @@ -2,6 +2,11 @@ allprojects { repositories { google() mavenCentral() + // TODO: remove before merging, together with the purchases 11.0.0-SNAPSHOT pins. + maven { + url = uri("https://central.sonatype.com/repository/maven-snapshots/") + content { includeGroup("com.revenuecat.purchases") } + } } } diff --git a/e2e-tests/MaestroTestApp/android/build.gradle.kts b/e2e-tests/MaestroTestApp/android/build.gradle.kts index dbee657bb..e68049c7d 100644 --- a/e2e-tests/MaestroTestApp/android/build.gradle.kts +++ b/e2e-tests/MaestroTestApp/android/build.gradle.kts @@ -2,6 +2,11 @@ allprojects { repositories { google() mavenCentral() + // TODO: remove before merging, together with the purchases 11.0.0-SNAPSHOT pins. + maven { + url = uri("https://central.sonatype.com/repository/maven-snapshots/") + content { includeGroup("com.revenuecat.purchases") } + } } } diff --git a/e2e-tests/agp9_test_app/android/build.gradle.kts b/e2e-tests/agp9_test_app/android/build.gradle.kts index dbee657bb..e68049c7d 100644 --- a/e2e-tests/agp9_test_app/android/build.gradle.kts +++ b/e2e-tests/agp9_test_app/android/build.gradle.kts @@ -2,6 +2,11 @@ allprojects { repositories { google() mavenCentral() + // TODO: remove before merging, together with the purchases 11.0.0-SNAPSHOT pins. + maven { + url = uri("https://central.sonatype.com/repository/maven-snapshots/") + content { includeGroup("com.revenuecat.purchases") } + } } } diff --git a/revenuecat_examples/purchase_tester/android/build.gradle b/revenuecat_examples/purchase_tester/android/build.gradle index bc157bd1a..59794d8b2 100644 --- a/revenuecat_examples/purchase_tester/android/build.gradle +++ b/revenuecat_examples/purchase_tester/android/build.gradle @@ -2,6 +2,11 @@ allprojects { repositories { google() mavenCentral() + // TODO: remove before merging, together with the purchases 11.0.0-SNAPSHOT pins. + maven { + url 'https://central.sonatype.com/repository/maven-snapshots/' + content { includeGroup 'com.revenuecat.purchases' } + } } } From d449e772b035dd1236dd03bbfe14b06a5c83f5ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Brey?= Date: Thu, 24 Sep 2026 11:11:53 +0200 Subject: [PATCH 6/6] build(purchases_ui_flutter): raise compileSdk to 35 --- purchases_ui_flutter/android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/purchases_ui_flutter/android/build.gradle b/purchases_ui_flutter/android/build.gradle index 51298a8af..087a1f5c2 100644 --- a/purchases_ui_flutter/android/build.gradle +++ b/purchases_ui_flutter/android/build.gradle @@ -53,7 +53,7 @@ android { defaultConfig { minSdkVersion 24 - compileSdk 34 + compileSdk 35 // Fix variant resolution for purchases-android local builds missingDimensionStrategy 'apis', 'defaults' missingDimensionStrategy 'billingclient', 'bc8'