When building Flutter projects I noticed that sometimes, Gradle task 'assembleDebug' would run even if I had already build the project successfully earlier, and it downloads upto 500MB or almost 1GB of downloads. If I make changes to the code and try to run it again, the Gradle task 'assembleDebug' does some 200MB or 300MB of downloads again just to be able to build the APK.
When I raised this as an issue, the Flutter developers asked for details and tried to dismiss it as an environment issue on my computer. But I kept investigating and found that adding `org.gradle.caching=true` to `<my_flutter_app_folder>/android/gradle.properties` solved the problem. I did a bit more digging and added two more lines. This is all you need to add to the `gradle.properties` file:
org.gradle.caching=true
org.gradle.parallel=true
org.gradle.daemon=true
No comments:
Post a Comment