Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Bump compileSdkVersion to 31 #4432

Merged
merged 3 commits into from
Oct 16, 2021
Merged
Show file tree
Hide file tree
Changes from all 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 packages/camera/camera/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
group 'io.flutter.plugins.camera'
version '1.0-SNAPSHOT'
def args = ["-Xlint:deprecation","-Xlint:unchecked","-Werror"]
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume the issue here is that the set of warnings will vary based on the build settings of the app depending on the plugin, so we don't want them to be errors?

Copy link
Author

Choose a reason for hiding this comment

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

right. This is temporary as the fix is pending: #4423

def args = ["-Xlint:deprecation","-Xlint:unchecked"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Would the removal of the -Werror flag be permanent? If not maybe add a comment explaining why it is temporary removed?

Copy link
Author

Choose a reason for hiding this comment

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

this is temporary and can be reverted after #4423


buildscript {
repositories {
Expand Down
9 changes: 6 additions & 3 deletions script/tool/lib/src/create_all_plugins_app_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,13 @@ class CreateAllPluginsAppCommand extends PluginCommand {

final StringBuffer newGradle = StringBuffer();
for (final String line in gradleFile.readAsLinesSync()) {
if (line.contains('minSdkVersion 16')) {
// Android SDK 20 is required by Google maps.
// Android SDK 19 is required by WebView.
if (line.contains('minSdkVersion')) {
// minSdkVersion 20 is required by Google maps.
// minSdkVersion 19 is required by WebView.
newGradle.writeln('minSdkVersion 20');
} else if (line.contains('compileSdkVersion')) {
// compileSdkVersion 31 is required by Camera.
newGradle.writeln('compileSdkVersion 31');
} else {
newGradle.writeln(line);
}
Expand Down