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

[dash] Fix Android release tutorial to not break builds sans android/key.properties #1536

Merged
merged 1 commit into from
Oct 29, 2018
Merged

[dash] Fix Android release tutorial to not break builds sans android/key.properties #1536

merged 1 commit into from
Oct 29, 2018

Conversation

artob
Copy link

@artob artob commented Oct 24, 2018

The instructions at https://flutter.io/android-release/ currently have a significant deficiency: after an app's android/app/build.gradle has been modified following these instructions, it is no longer possible to build and run the app without having the android/key.properties file present.

On any development team where only one person acts as release manager, this breaks everybody else's checkouts and flutter run workflow. Moreover, while the fix may be relatively obvious (as per my patch), it wasn't obvious to at least one junior developer who got stuck on the problem for more than a day. It would be good to fix the documentation to eliminate this problem.

Many (eventually all?) Flutter users run into this problem. The workaround is always the same: instructing others to edit their local android/app/build.gradle to comment out the keystore and release configuration. For example, from a quick google:

I reproduce the error from flutter run below for the benefit of users googling how to fix this problem:

$ flutter run
Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...                                       2.6s
Resolving dependencies...                                        
* Error running Gradle:
Exit code 1 from: myapp/android/gradlew app:properties:
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.

FAILURE: Build failed with an exception.

* Where:
Build file 'myapp/android/app/build.gradle' line: 29

* What went wrong:
A problem occurred evaluating project ':app'.
> myapp/android/key.properties (No such file or directory)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s


Please review your Gradle project setup in the android/ folder.

@googlebot googlebot added the cla: yes Contributor has signed the Contributor License Agreement label Oct 24, 2018
@sfshaza2
Copy link
Contributor

Thanks for this PR, @bendiken!

@chinmaygarde, can you review? It's a minor change with a big benefit.

@bendiken, you obviously didn't know we were about to re-structure the dash branch. So, we have two options, assuming Chinmay approves. Either you can resolve the conflicts, or I can create a new branch and copy your edits. Which do you prefer?

@sfshaza2
Copy link
Contributor

Thanks, @jason-simmons! @bendiken, how would you like to proceed regarding the conflicts?

@artob
Copy link
Author

artob commented Oct 29, 2018

Thanks, @jason-simmons! @bendiken, how would you like to proceed regarding the conflicts?

I'll go ahead and resolve and re-submit momentarily 👍

@sfshaza2 sfshaza2 merged commit 895a769 into flutter:dash Oct 29, 2018
@sfshaza2
Copy link
Contributor

Thanks, @bendiken!

@sfshaza2 sfshaza2 changed the title Fix Android release tutorial to not break builds sans android/key.properties [dash] Fix Android release tutorial to not break builds sans android/key.properties Oct 29, 2018
@artob artob deleted the fix-release-howto branch October 30, 2018 11:00
danijelconsulting added a commit to danijelconsulting/Flutter-Music-Player that referenced this pull request Oct 14, 2023
X25MB added a commit to X25MB/Flutter-Music-Player that referenced this pull request Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Contributor has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants