Skip to content

Commit 194f414

Browse files
fix(android): read Kotlin version from root project
- Read kotlinVersion from rootProject.ext instead of hardcoding - Matches stripe-react-native pattern for version detection - Ensures Kotlin 2.0 detection works correctly
1 parent 3c3826b commit 194f414

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

packages/stripe_android/android/build.gradle

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ group 'com.flutter.stripe'
22
version '1.0-SNAPSHOT'
33

44
buildscript {
5-
ext.kotlin_version = '1.9.0'
5+
// Read Kotlin version from root project or fallback to 1.9.0
6+
def kotlin_version = rootProject.ext.has('kotlinVersion')
7+
? rootProject.ext.get('kotlinVersion')
8+
: '1.9.0'
9+
10+
ext.kotlin_version = kotlin_version
611
ext.stripe_version = '21.26.+'
712
ext.compose_version = '1.5.1'
813

@@ -30,6 +35,10 @@ rootProject.allprojects {
3035
}
3136
}
3237

38+
// Read Kotlin version from root project or fallback to 1.9.0
39+
def kotlin_version = rootProject.ext.has('kotlinVersion')
40+
? rootProject.ext.get('kotlinVersion')
41+
: '1.9.0'
3342
def kotlinMajor = kotlin_version.tokenize('\\.')[0].toInteger()
3443

3544
apply plugin: 'com.android.library'

0 commit comments

Comments
 (0)