当前位置:网站首页>After flutter was upgraded from 2.2.3 to 2.5, the compilation of mixed projects became slower
After flutter was upgraded from 2.2.3 to 2.5, the compilation of mixed projects became slower
2022-06-25 16:00:00 【Favorite grapes】
Catalog
As the title ,Flutter from 2.2.3 Upgrade to 2.5 After the version ,build The time is very long , It is found that all the dependency information in the project is printed in the built console , Lead to longer time .
Solution 1
look for flutter SDK Storage location of , modify flutter.gradle file :
File path :$flutter_sdk$/packages/flutter_tools/gradle/flutter.gradle
apply plugin: FlutterPlugin
class FlutterPlugin implements Plugin<Project> {
......
@Override
void apply(Project project) {
this.project = project
def rootProject = project.rootProject
// Just adjust this paragraph of notes
// rootProject.tasks.register('generateLockfiles') {
// rootProject.subprojects.each { subproject ->
// def gradlew = (OperatingSystem.current().isWindows()) ?
// "${rootProject.projectDir}/gradlew.bat" : "${rootProject.projectDir}/gradlew"
// rootProject.exec {
// workingDir rootProject.projectDir
// executable gradlew
// args ":${subproject.name}:dependencies", "--write-locks"
// }
// }
// }
......
}
Solution 2
take gradle Version upgrade to and flutter The version used is consistent , here 2.5.1 Corresponding gradle Version is ,6.7.0
The analysis process
1、build A lot is printed in the window dependence Information
build In the process of ,build The window will print out the operation of each step , In the view window , I found that a lot of dependence Information , I remember in gradle There is such an instruction in the instruction of , You can print all dependence Information about , At that time, it was to check whether there were repeated dependencies . The print here may be some build Mission , This information was printed .
2、 Analyze recent code changes
Restore the code to a branch state , See if it's because of the recent gradle Problems caused by modification , After switching the branch, no change occurs , The above information is still printed .
3、 Only recently flutter upgrade
Later, I thought that recently, only right flutter Upgraded , therefore , take flutter Degraded , After demotion, I found build The process no longer prints dependent information , Upgrade it back ,build The process presents dependent information .
4、 lookup flutter Module building process
Since it is flutter Module problem , Then check its build file , So in the module gradle The following line is found in
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
Then find the corresponding file , It is found that all dependent codes are added to the code . So I adjusted the notes to , You can cancel printing all dependent information . The framework process returns to normal , No longer takes too long .
边栏推荐
- Several relationships of UML
- VectorDraw Developer Framework 10.1001 Crack
- Go development team technical leader Russ Cox sends a document to share go's version control history
- Prototype mode
- 基于神经标签搜索,中科院&微软亚研零样本多语言抽取式摘要入选ACL 2022
- Understand the execution sequence of try catch finally in one diagram
- Sword finger offer 03 Duplicate number in array
- Differences between = = and = = = in JS (detailed explanation)
- js 给元素添加自定义属性
- Why is it said that restarting can solve 90% of the problems
猜你喜欢

Sword finger offer 09 Implementing queues with two stacks

Rxjs TakeUntil 操作符的学习笔记
Check whether the port number is occupied

Don't underestimate the integral mall, its role can be great!

Binocular 3D perception (I): preliminary understanding of binocular

地理位置数据存储方案——Redis GEO

For the first time in Chinese universities! Unique in the world! Tongji students win international awards

TFIDF and BM25

How to reload the win10 app store?

通俗讲跨域
随机推荐
Super comprehensive custom deep copy function
Message format of Modbus (PLC)
Interviewer: your resume says you are proficient in mysql, so you say cluster / Union / overlay index, table return, index push down
Describe your understanding of the evolution process and internal structure of the method area
Continuously improve the overall performance of adaoracle Oracle Oracle
MySQL修改字段語句
The release of autok3s v0.5.0 continues to be simple and friendly
Mark the same items in the Li list in red
TFIDF and BM25
GridLayout evenly allocate space
Sword finger offer 06 Print linked list from end to end
The style of the mall can also change a lot. DIY can learn about it!
sql优化的几种方式
Advanced SQL statement 1 of Linux MySQL database
Pytest test framework notes
js 给元素添加自定义属性
Why is it said that restarting can solve 90% of the problems
Classic deadlock scenario of multithreading and its solution (philosopher dining problem)
After the project is pushed to the remote warehouse, Baota webhook automatically publishes it
Open the box to experience rust, come on!!!