Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 2 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
5 changes: 4 additions & 1 deletion 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')) {
if (line.contains('minSdkVersion')) {
// Android SDK 20 is required by Google maps.
// Android SDK 19 is required by WebView.
newGradle.writeln('minSdkVersion 20');
} else if (line.contains('compileSdkVersion')) {
// Android SDK 31 is required by Camera.
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems very confusing to use exactly the same comment wording here for a very different kind of minimum requirement than is being described a couple of lines earlier.

Copy link
Author

Choose a reason for hiding this comment

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

I'm not sure I fully get the concern. The app minSdkVersion/compileSdkVersion is dictated by the specific requirements of each plugin.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm saying that just above, "Android SDK X is required" is referring to the runtime version requirement, and here "Android SDK X is required" is used to refer to the compile-time SDK.

Describing two completely different kinds of requirements with exactly the same text is very confusing.

Copy link
Author

Choose a reason for hiding this comment

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

done

newGradle.writeln('compileSdkVersion 31');
} else {
newGradle.writeln(line);
}
Expand Down