Skip to content

Commit 5913f27

Browse files
[FSSDK-11875] chore: add support for android 15 (#84)
* build: update Android build configurations - Bump compile SDK version to 35 and build tools version to "35.0.0" - Update target SDK version to 35 - Add namespace 'com.optimizely.optimizely_flutter_sdk' - Enable buildConfig feature - Update kotlin-stdlib-jdk7 to version 2.1.0 - Update jackson-databind to version 2.17.2 - Set minSdkVersion and targetSdkVersion to 35 for example app - Update distributionUrl in gradle-wrapper.properties to Gradle 8.10.2 - Update android plugin version to 8.7.0 and kotlin-android version to 2.1.0 * build: update Android SDK versions - Update compile SDK version to 36 and build tools version to "36.0.0" - Change min SDK version to 21 and target SDK version to 36 in the Android build configuration - Update compile SDK version to 36 and target SDK version to 36 in the example app build.gradle file * fix: update android build configuration - Update compile_sdk_version and build_tools_version to 35 - Remove target_sdk_version from ext - Update compileSdkVersion and targetSdkVersion in app/build.gradle to 35 * refactor: update compile and target SDK versions - Update compile SDK version to use project property if available, fallback to default - Update target SDK version to use project property if available, fallback to default * fix: remove conditional expressions for compileSdkVersion and targetSdkVersion - Simplify specifying compileSdkVersion and targetSdkVersion directly from flutter configuration
1 parent bbb4790 commit 5913f27

File tree

4 files changed

+20
-15
lines changed

4 files changed

+20
-15
lines changed

android/build.gradle

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,22 @@ rootProject.allprojects {
2424

2525

2626
ext {
27-
compile_sdk_version = 32
28-
build_tools_version = "30.0.3"
27+
compile_sdk_version = 35
2928
min_sdk_version = 21
30-
target_sdk_version = 29
3129
}
3230

3331
android {
34-
compileSdkVersion compile_sdk_version
35-
buildToolsVersion build_tools_version
32+
namespace 'com.optimizely.optimizely_flutter_sdk'
33+
compileSdkVersion rootProject.hasProperty('flutter.compileSdkVersion')
34+
? rootProject.flutter.compileSdkVersion.toInteger()
35+
: compile_sdk_version
36+
37+
buildFeatures {
38+
buildConfig true
39+
}
3640

3741
defaultConfig {
3842
minSdkVersion min_sdk_version
39-
targetSdkVersion target_sdk_version
4043
versionCode 1
4144
versionName version_name
4245
buildConfigField "String", "CLIENT_VERSION", "\"$version_name\""
@@ -73,9 +76,9 @@ dependencies {
7376
implementation 'com.github.tony19:logback-android:3.0.0'
7477
implementation 'org.slf4j:slf4j-api:2.0.7'
7578

76-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10"
79+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.1.0"
7780
implementation "com.optimizely.ab:android-sdk:5.0.1"
78-
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.4'
81+
implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.2'
7982
implementation ('com.google.guava:guava:19.0') {
8083
exclude group:'com.google.guava', module:'listenablefuture'
8184
}

example/android/app/build.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ if (flutterVersionName == null) {
2424
}
2525

2626
android {
27-
compileSdkVersion 32
28-
ndkVersion flutter.ndkVersion
27+
namespace "com.optimizely.optimizely_flutter_sdk_example"
28+
29+
compileSdkVersion flutter.compileSdkVersion
2930

3031
compileOptions {
3132
sourceCompatibility JavaVersion.VERSION_1_8
@@ -37,8 +38,9 @@ android {
3738
applicationId "com.optimizely.optimizely_flutter_sdk_example"
3839
// You can update the following values to match your application needs.
3940
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
40-
minSdkVersion 21
41-
targetSdkVersion 32
41+
minSdkVersion flutter.minSdkVersion
42+
targetSdkVersion flutter.targetSdkVersion
43+
4244
versionCode flutterVersionCode.toInteger()
4345
versionName flutterVersionName
4446
}

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip

example/android/settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ pluginManagement {
2626

2727
plugins {
2828
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
29-
id "com.android.application" version "7.2.1" apply false
30-
id "org.jetbrains.kotlin.android" version "1.6.10" apply false
29+
id "com.android.application" version "8.7.0" apply false
30+
id "org.jetbrains.kotlin.android" version "2.1.0" apply false
3131
}
3232

3333
include ":app"

0 commit comments

Comments
 (0)