Skip to content

Commit

Permalink
[most on Android] Bump compile SDK version to 34 (#5783)
Browse files Browse the repository at this point in the history
This PR does the following:

1. Bumps compile SDK version to 34 for all packages on Android besides `webview_flutter_android`, which is blocked by finishing flutter/flutter#137082.
2. Bumps legacy all_packages app to 33 because compiling failed after completing 1 (see example of failing build [here](https://ci.chromium.org/ui/p/flutter/builders/try/Linux_android%20android_build_all_packages%20master/5159/overview)). There was a Flutter fix available, so I believe this bump is safe.
3. Replaces all deprecated `compileSdkVersion` usages with `compileSdk`.
  • Loading branch information
camsim99 committed Jan 22, 2024
1 parent 5be1553 commit 88b7d16
Show file tree
Hide file tree
Showing 83 changed files with 127 additions and 72 deletions.
2 changes: 2 additions & 0 deletions .ci/legacy_project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ and then deleting everything but `android/` from it:
- Added license boilerplate.
- Replaced `jcenter` in build.gradle with `mavenCentral`, due to the
jcenter.bintray.com shutdown.
- Update `compileSdkVersion` from 30 to 33 to maintain compatibility
with plugins that use API 34.
2 changes: 1 addition & 1 deletion .ci/legacy_project/all_packages/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 30
compileSdkVersion 33

defaultConfig {
applicationId "com.example.all_packages"
Expand Down
2 changes: 1 addition & 1 deletion packages/animations/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
namespace 'dev.flutter.packages.animations.example'
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
namespace 'io.flutter.plugins.cameraexample'
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion


defaultConfig {
Expand Down
4 changes: 4 additions & 0 deletions packages/camera/camera_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Updates compileSdk version to 34.

## 0.10.8+16

* Fixes new lint warnings.
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_android/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ buildFeatures {
if (project.android.hasProperty("namespace")) {
namespace 'io.flutter.plugins.camera'
}
compileSdkVersion 33
compileSdk 34

defaultConfig {
minSdkVersion 21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
namespace 'io.flutter.plugins.cameraexample'
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion


defaultConfig {
Expand Down
4 changes: 4 additions & 0 deletions packages/camera/camera_android_camerax/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Updates compileSdk version to 34.

## 0.5.0+27

* Removes or updates any references to an `ActivityPluginBinding` when the plugin is detached
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ android {
namespace 'io.flutter.plugins.camerax'
}
// CameraX dependencies require compilation against version 33 or later.
compileSdkVersion 33
compileSdk 34

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
namespace 'io.flutter.plugins.cameraxexample'
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

compileOptions {
Expand Down
2 changes: 1 addition & 1 deletion packages/dynamic_layouts/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
namespace 'dev.flutter.packages.animations.example'
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

compileOptions {
Expand Down
4 changes: 4 additions & 0 deletions packages/espresso/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Updates compileSdk version to 34.

## 0.3.0+7

* Replaces call to deprecated `getObservatoryUri`.
Expand Down
2 changes: 1 addition & 1 deletion packages/espresso/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android {
if (project.android.hasProperty("namespace")) {
namespace 'com.example.espresso'
}
compileSdkVersion 33
compileSdk 34

defaultConfig {
minSdkVersion 16
Expand Down
2 changes: 1 addition & 1 deletion packages/espresso/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
namespace "com.example.espresso_example"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'com.google.gms.google-services'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
namespace "dev.flutter.plugins.file_selector_example"
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

compileOptions {
Expand Down
4 changes: 4 additions & 0 deletions packages/file_selector/file_selector_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Updates compileSdk version to 34.

## 0.5.0+7

* Bumps androidx.annotation:annotation from 1.7.0 to 1.7.1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android {
if (project.android.hasProperty("namespace")) {
namespace 'dev.flutter.packages.file_selector_android'
}
compileSdkVersion 33
compileSdk 34

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
namespace "dev.flutter.packages.file_selector_android_example"
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

compileOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

compileOptions {
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter_image/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
namespace "com.example.example"
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

compileOptions {
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter_markdown/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand Down
1 change: 1 addition & 0 deletions packages/flutter_plugin_android_lifecycle/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT

* Updates compileSdk version to 34.
* Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.

## 2.0.17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android {
if (project.android.hasProperty("namespace")) {
namespace 'io.flutter.plugins.flutter_plugin_android_lifecycle'
}
compileSdkVersion 33
compileSdk 34

defaultConfig {
minSdkVersion 16
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion


defaultConfig {
Expand Down
2 changes: 1 addition & 1 deletion packages/go_router/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion


defaultConfig {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Updates compileSdk version to 34.

## 2.6.2

* Updates minimum required plugin_platform_interface version to 2.1.7.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android {
if (project.android.hasProperty("namespace")) {
namespace 'io.flutter.plugins.googlemaps'
}
compileSdkVersion 33
compileSdk 34

defaultConfig {
minSdkVersion 20
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
namespace 'io.flutter.plugins.googlemapsexample'
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion


defaultConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
namespace 'io.flutter.plugins.googlesigninexample'
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion


defaultConfig {
Expand Down
4 changes: 4 additions & 0 deletions packages/google_sign_in/google_sign_in_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Updates compileSdk version to 34.

## 6.1.21

* Updates `clearAuthCache` override to match base class declaration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android {
if (project.android.hasProperty("namespace")) {
namespace 'io.flutter.plugins.googlesignin'
}
compileSdkVersion 33
compileSdk 34

defaultConfig {
minSdkVersion 16
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
namespace 'io.flutter.plugins.googlesigninexample'
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion


defaultConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
namespace 'io.flutter.plugins.imagepickerexample'
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion
testOptions.unitTests.includeAndroidResources = true


Expand Down
4 changes: 4 additions & 0 deletions packages/image_picker/image_picker_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Updates compileSdk version to 34.

## 0.8.9+3

* Bumps androidx.annotation:annotation from 1.7.0 to 1.7.1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android {
if (project.android.hasProperty("namespace")) {
namespace 'io.flutter.plugins.imagepicker'
}
compileSdkVersion 33
compileSdk 34

defaultConfig {
minSdkVersion 16
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
namespace 'io.flutter.plugins.imagepickerexample'
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion
testOptions.unitTests.includeAndroidResources = true


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ android {
}
}

compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion


defaultConfig {
Expand Down
4 changes: 4 additions & 0 deletions packages/in_app_purchase/in_app_purchase_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Updates compileSdk version to 34.

## 0.3.0+17

* Bumps androidx.annotation:annotation from 1.7.0 to 1.7.1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android {
if (project.android.hasProperty("namespace")) {
namespace 'io.flutter.plugins.inapppurchase'
}
compileSdkVersion 33
compileSdk 34

defaultConfig {
minSdkVersion 16
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
namespace 'io.flutter.plugins.inapppurchaseexample'
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion

signingConfigs {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
namespace 'io.flutter.plugins.localauthexample'
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion


defaultConfig {
Expand Down
4 changes: 4 additions & 0 deletions packages/local_auth/local_auth_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Updates compileSdk version to 34.

## 1.0.36

* Updates androidx.fragment version to 1.6.2.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android {
if (project.android.hasProperty("namespace")) {
namespace 'io.flutter.plugins.localauth'
}
compileSdkVersion 33
compileSdk 34

defaultConfig {
minSdkVersion 16
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
namespace 'io.flutter.plugins.localauthexample'
compileSdkVersion flutter.compileSdkVersion
compileSdk flutter.compileSdkVersion


defaultConfig {
Expand Down

0 comments on commit 88b7d16

Please sign in to comment.