def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { localPropertiesFile.withReader('UTF-8') { reader -> localProperties.load(reader) } }
def flutterRoot = localProperties.getProperty('flutter.sdk') if (flutterRoot == null) { throw new FileNotFoundException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") }
# --analyze-size参数用于生成*-code-size-analysis_*.json文件,该文件可以导入到devtools中进行分析包组成 flutter build xx --analyze-size # 打开devtools flutter pub global run devtools