Skip to content

Conversation

@jason-simmons
Copy link
Member

Fixes #10630

@jason-simmons
Copy link
Member Author

@tvolkert

Copy link
Contributor

@tvolkert tvolkert left a comment

Choose a reason for hiding this comment

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

Can you add a test?

@jason-simmons
Copy link
Member Author

Added a test.

@jason-simmons jason-simmons merged commit cfa0a2d into flutter:master Jun 19, 2017
final String apkFilename = 'app-$buildModeName.apk';
File apkFile = fs.file('$buildDirectory/$apkFilename');
if (apkFile.existsSync())
return apkFile;
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this will handle upgrades properly. When the user upgrades to the new Gradle plugin, the old apk might still be there. Since this code checks that location first, it will keep using the old apk (from before the upgrade) forever.

The workaround is to do a clean build (clearing the build directory), but this could be frustrating for the user to diagnose; it will just look like it doesn't work.

So, better to detect which Gradle plugin we're actually using and only look at its output location. Or maybe clear both locations before doing the build?

gspencergoog pushed a commit to gspencergoog/flutter that referenced this pull request Jul 1, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flutter doesn't understand filesystem paths used by gradle plugin 3.0.0

4 participants