Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Many] Bump to min minSdkVersion of 19 across all plugins #6506

Merged
merged 11 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -29,7 +29,7 @@ android {

defaultConfig {
applicationId "com.example.all_packages"
minSdkVersion 16
minSdkVersion flutter.minSdkVersion
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down
3 changes: 2 additions & 1 deletion packages/espresso/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 0.3.0+8

* Updates minSdkVersion to 19.
* Updates minimum supported SDK version to Flutter 3.13/Dart 3.1.
* Updates compileSdk version to 34.

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 @@ -29,7 +29,7 @@ android {
compileSdk 34

defaultConfig {
minSdkVersion 16
minSdkVersion 19
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

Expand Down
2 changes: 1 addition & 1 deletion packages/espresso/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Java classes for testing Flutter apps using Espresso.
Allows driving Flutter widgets from a native Espresso test.
repository: https://github.com/flutter/packages/tree/main/packages/espresso
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+espresso%22
version: 0.3.0+7
version: 0.3.0+8

environment:
sdk: ^3.1.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the discussion in comments, every package being touched here that still lists Flutter 3.13 support needs to be changed to 3.16 instead.

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

* Updates minSdkVersion to 19.

## 2.0.18

* Updates minimum supported SDK version to Flutter 3.13/Dart 3.1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ android {
compileSdk 34

defaultConfig {
minSdkVersion 16
minSdkVersion 19
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'proguard.txt'
}
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter_plugin_android_lifecycle/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flutter_plugin_android_lifecycle
description: Flutter plugin for accessing an Android Lifecycle within other plugins.
repository: https://github.com/flutter/packages/tree/main/packages/flutter_plugin_android_lifecycle
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+flutter_plugin_android_lifecycle%22
version: 2.0.18
version: 2.0.19

environment:
sdk: ^3.1.0
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 @@
## 6.1.23

* Updates minSdkVersion to 19.

## 6.1.22

* Updates minimum supported SDK version to Flutter 3.13/Dart 3.1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ android {
compileSdk 34

defaultConfig {
minSdkVersion 16
minSdkVersion 19
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: google_sign_in_android
description: Android implementation of the google_sign_in plugin.
repository: https://github.com/flutter/packages/tree/main/packages/google_sign_in/google_sign_in_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+google_sign_in%22
version: 6.1.22
version: 6.1.23

environment:
sdk: ^3.1.0
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 @@
## 0.8.9+6

* Updates minSdkVersion to 19.

## 0.8.9+5

* Bumps androidx.exifinterface:exifinterface from 1.3.6 to 1.3.7.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ android {
compileSdk 34

defaultConfig {
minSdkVersion 16
minSdkVersion 19
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public void chooseMediaFromGallery(

private void launchPickMediaFromGalleryIntent(Messages.GeneralOptions generalOptions) {
Intent pickMediaIntent;
if (generalOptions.getUsePhotoPicker() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
if (generalOptions.getUsePhotoPicker()) {
if (generalOptions.getAllowMultiple()) {
pickMediaIntent =
new ActivityResultContracts.PickMultipleVisualMedia()
Expand All @@ -320,9 +320,7 @@ private void launchPickMediaFromGalleryIntent(Messages.GeneralOptions generalOpt
pickMediaIntent.setType("*/*");
String[] mimeTypes = {"video/*", "image/*"};
pickMediaIntent.putExtra("CONTENT_TYPE", mimeTypes);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
pickMediaIntent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, generalOptions.getAllowMultiple());
}
pickMediaIntent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, generalOptions.getAllowMultiple());
}
activity.startActivityForResult(pickMediaIntent, REQUEST_CODE_CHOOSE_MEDIA_FROM_GALLERY);
}
Expand All @@ -341,7 +339,7 @@ public void chooseVideoFromGallery(

private void launchPickVideoFromGalleryIntent(Boolean usePhotoPicker) {
Intent pickVideoIntent;
if (usePhotoPicker && Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
if (usePhotoPicker) {
pickVideoIntent =
new ActivityResultContracts.PickVisualMedia()
.createIntent(
Expand Down Expand Up @@ -439,7 +437,7 @@ public void chooseMultiImageFromGallery(

private void launchPickImageFromGalleryIntent(Boolean usePhotoPicker) {
Intent pickImageIntent;
if (usePhotoPicker && Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
if (usePhotoPicker) {
pickImageIntent =
new ActivityResultContracts.PickVisualMedia()
.createIntent(
Expand All @@ -456,7 +454,7 @@ private void launchPickImageFromGalleryIntent(Boolean usePhotoPicker) {

private void launchMultiPickImageFromGalleryIntent(Boolean usePhotoPicker) {
Intent pickMultiImageIntent;
if (usePhotoPicker && Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
if (usePhotoPicker) {
pickMultiImageIntent =
new ActivityResultContracts.PickMultipleVisualMedia()
.createIntent(
Expand All @@ -467,9 +465,7 @@ private void launchMultiPickImageFromGalleryIntent(Boolean usePhotoPicker) {
} else {
pickMultiImageIntent = new Intent(Intent.ACTION_GET_CONTENT);
pickMultiImageIntent.setType("image/*");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
pickMultiImageIntent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
}
pickMultiImageIntent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
}
activity.startActivityForResult(
pickMultiImageIntent, REQUEST_CODE_CHOOSE_MULTI_IMAGE_FROM_GALLERY);
Expand Down
2 changes: 1 addition & 1 deletion packages/image_picker/image_picker_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: image_picker_android
description: Android implementation of the image_picker plugin.
repository: https://github.com/flutter/packages/tree/main/packages/image_picker/image_picker_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+image_picker%22
version: 0.8.9+5
version: 0.8.9+6

environment:
sdk: ^3.1.0
Expand Down
4 changes: 4 additions & 0 deletions packages/path_provider/path_provider_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.2.4

* Updates minSdkVersion version to 19.

## 2.2.3

* Updates minimum supported SDK version to Flutter 3.13/Dart 3.1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ android {
compileSdk 34

defaultConfig {
minSdkVersion 16
minSdkVersion 19
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
package io.flutter.plugins.pathprovider;

import android.content.Context;
import android.os.Build.VERSION;
import android.os.Build.VERSION_CODES;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down Expand Up @@ -110,14 +108,7 @@ private String getPathProviderStorageDirectory() {
private List<String> getPathProviderExternalCacheDirectories() {
final List<String> paths = new ArrayList<>();

if (VERSION.SDK_INT >= VERSION_CODES.KITKAT) {
for (File dir : context.getExternalCacheDirs()) {
if (dir != null) {
paths.add(dir.getAbsolutePath());
}
}
} else {
File dir = context.getExternalCacheDir();
for (File dir : context.getExternalCacheDirs()) {
if (dir != null) {
paths.add(dir.getAbsolutePath());
}
Expand Down Expand Up @@ -159,14 +150,7 @@ private List<String> getPathProviderExternalStorageDirectories(
@NonNull Messages.StorageDirectory directory) {
final List<String> paths = new ArrayList<>();

if (VERSION.SDK_INT >= VERSION_CODES.KITKAT) {
for (File dir : context.getExternalFilesDirs(getStorageDirectoryString(directory))) {
if (dir != null) {
paths.add(dir.getAbsolutePath());
}
}
} else {
File dir = context.getExternalFilesDir(getStorageDirectoryString(directory));
for (File dir : context.getExternalFilesDirs(getStorageDirectoryString(directory))) {
if (dir != null) {
paths.add(dir.getAbsolutePath());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

package io.flutter.plugins.pathprovider;

import android.os.Build.VERSION;
import android.os.Build.VERSION_CODES;
import android.os.Environment;

/** Helps to map the Dart `StorageDirectory` enum to a Android system constant. */
Expand Down Expand Up @@ -42,11 +40,7 @@ static String androidType(Integer dartIndex) throws IllegalArgumentException {
case 8:
return Environment.DIRECTORY_DCIM;
case 9:
if (VERSION.SDK_INT >= VERSION_CODES.KITKAT) {
return Environment.DIRECTORY_DOCUMENTS;
} else {
throw new IllegalArgumentException("Documents directory is unsupported.");
}
return Environment.DIRECTORY_DOCUMENTS;
default:
throw new IllegalArgumentException("Unknown index: " + dartIndex);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: path_provider_android
description: Android implementation of the path_provider plugin.
repository: https://github.com/flutter/packages/tree/main/packages/path_provider/path_provider_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+path_provider%22
version: 2.2.3
version: 2.2.4

environment:
sdk: ^3.1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ android {
}

defaultConfig {
minSdkVersion 16
minSdkVersion 19
}

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

defaultConfig {
minSdkVersion 16
minSdkVersion 19
}

testOptions {
Expand Down
3 changes: 2 additions & 1 deletion packages/quick_actions/quick_actions_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 1.0.11

* Updates minSdkVersion to 19.
* Updates minimum supported SDK version to Flutter 3.13/Dart 3.1.
* Updates compileSdk version to 34.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ android {
compileSdk 34

defaultConfig {
minSdkVersion 16
minSdkVersion 19
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: quick_actions_android
description: An implementation for the Android platform of the Flutter `quick_actions` plugin.
repository: https://github.com/flutter/packages/tree/main/packages/quick_actions/quick_actions_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
version: 1.0.10
version: 1.0.11

environment:
sdk: ^3.1.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 2.2.2

* Updates minSdkVersion to 19.
* Updates minimum supported SDK version to Flutter 3.13/Dart 3.1.
* Updates compileSdk version to 34.
* Updates mockito to 5.2.0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ android {
}

defaultConfig {
minSdkVersion 16
minSdkVersion 19
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: shared_preferences_android
description: Android implementation of the shared_preferences plugin
repository: https://github.com/flutter/packages/tree/main/packages/shared_preferences/shared_preferences_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+shared_preferences%22
version: 2.2.1
version: 2.2.2

environment:
sdk: ^3.1.0
Expand Down
3 changes: 2 additions & 1 deletion packages/url_launcher/url_launcher_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 6.3.1

* Updates minSdkVersion to 19.
* Updates minimum supported SDK version to Flutter 3.13/Dart 3.1.

## 6.3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ android {
compileSdk 34

defaultConfig {
minSdkVersion 16
minSdkVersion 19
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

Expand Down
2 changes: 1 addition & 1 deletion packages/url_launcher/url_launcher_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: url_launcher_android
description: Android implementation of the url_launcher plugin.
repository: https://github.com/flutter/packages/tree/main/packages/url_launcher/url_launcher_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+url_launcher%22
version: 6.3.0
version: 6.3.1
environment:
sdk: ^3.1.0
flutter: ">=3.13.0"
Expand Down
3 changes: 2 additions & 1 deletion packages/video_player/video_player_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 2.4.13

* Updates minSdkVersion to 19.
* Updates minimum supported SDK version to Flutter 3.13/Dart 3.1.

## 2.4.12
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ android {
compileSdk 34

defaultConfig {
minSdkVersion 16
minSdkVersion 19
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
Expand Down
Loading