@@ -85,12 +85,11 @@ Future<void> genPluginXml(BuildSpec spec, String destDir, String path) async {
8585 var templatePath =
8686 '${path .substring (0 , path .length - '.xml' .length )}_template.xml' ;
8787 var file =
88- await File (p.join (rootPath, destDir, path)).create (recursive: true );
88+ await File (p.join (rootPath, destDir, path)).create (recursive: true );
8989 log ('writing ${p .relative (file .path )}' );
9090 var dest = file.openWrite ();
9191 dest.writeln (
92- "<!-- Do not edit; instead, modify ${p .basename (
93- templatePath )}, and run './bin/plugin generate'. -->" );
92+ "<!-- Do not edit; instead, modify ${p .basename (templatePath )}, and run './bin/plugin generate'. -->" );
9493 dest.writeln ();
9594 await utf8.decoder
9695 .bind (File (p.join (rootPath, 'resources' , templatePath)).openRead ())
@@ -111,7 +110,7 @@ bool genPresubmitYaml(List<BuildSpec> specs) {
111110 }
112111
113112 var templateFile =
114- File (p.join (rootPath, '.github' , 'workflows' , 'presubmit.yaml.template' ));
113+ File (p.join (rootPath, '.github' , 'workflows' , 'presubmit.yaml.template' ));
115114 var templateContents = templateFile.readAsStringSync ();
116115 // If we need to make many changes consider something like genPluginXml().
117116 templateContents =
@@ -170,8 +169,7 @@ Future<bool> performReleaseChecks(ProductCommand cmd) async {
170169 return false ;
171170 }
172171 if (! cmd.isReleaseValid) {
173- log ('the release identifier ("${cmd
174- .release }") must be of the form xx.x (major.minor)' );
172+ log ('the release identifier ("${cmd .release }") must be of the form xx.x (major.minor)' );
175173 return false ;
176174 }
177175 var gitDir = await GitDir .fromExisting (rootPath);
@@ -180,7 +178,7 @@ Future<bool> performReleaseChecks(ProductCommand cmd) async {
180178 var branch = await gitDir.currentBranch ();
181179 var name = branch.branchName;
182180 var expectedName =
183- cmd.isDevChannel ? 'master' : "release_${cmd .releaseMajor }" ;
181+ cmd.isDevChannel ? 'master' : "release_${cmd .releaseMajor }" ;
184182 var result = name == expectedName;
185183 if (! result) {
186184 result = name.startsWith ("release_${cmd .releaseMajor }" ) &&
@@ -203,23 +201,22 @@ Future<bool> performReleaseChecks(ProductCommand cmd) async {
203201 }
204202 // Finally, check that a jxbrowser.properties exists
205203 var jxBrowserFile =
206- File (p.join (rootPath, 'resources' , 'jxbrowser' , 'jxbrowser.properties' ));
204+ File (p.join (rootPath, 'resources' , 'jxbrowser' , 'jxbrowser.properties' ));
207205 var jxBrowserFileContents = jxBrowserFile.readAsStringSync ();
208206 if (jxBrowserFile.existsSync () &&
209207 jxBrowserFileContents.isNotEmpty &&
210208 jxBrowserFileContents.contains ('jxbrowser.license.key=' ) &&
211209 ! jxBrowserFileContents.contains ('jxbrowser.license.key=<KEY>' )) {
212210 return true ;
213211 } else {
214- log (
215- 'Release mode requires the jxbrowser.properties file to exist and include a key.' );
212+ log ('Release mode requires the jxbrowser.properties file to exist and include a key.' );
216213 }
217214 return false ;
218215}
219216
220217List <Map <String , Object ?>> readProductMatrix () {
221218 var contents =
222- File (p.join (rootPath, 'product-matrix.json' )).readAsStringSync ();
219+ File (p.join (rootPath, 'product-matrix.json' )).readAsStringSync ();
223220 var map = json.decode (contents);
224221 return (map['list' ] as List <Object ?>).cast <Map <String , Object ?>>();
225222}
@@ -239,8 +236,8 @@ String substituteTemplateVariables(String line, BuildSpec spec) {
239236 case 'CHANGELOG' :
240237 return spec.changeLog;
241238 case 'DEPEND' :
242- // If found, this is the module that triggers loading the Android Studio
243- // support. The public sources and the installable plugin use different ones.
239+ // If found, this is the module that triggers loading the Android Studio
240+ // support. The public sources and the installable plugin use different ones.
244241 return spec.isSynthetic
245242 ? 'com.intellij.modules.androidstudio'
246243 : 'com.android.tools.apk' ;
@@ -523,11 +520,7 @@ https://plugins.jetbrains.com/plugin/uploadPlugin
523520 log ('Upload failed: ${processResult .stderr } for file: $filePath ' );
524521 }
525522 final out = processResult.stdout as String ;
526- var message = out
527- .trim ()
528- .split ('\n ' )
529- .last
530- .trim ();
523+ var message = out.trim ().split ('\n ' ).last.trim ();
531524 log (message);
532525 return processResult.exitCode;
533526 }
@@ -548,9 +541,9 @@ class GenerateCommand extends ProductCommand {
548541 @override
549542 String get description =>
550543 'Generate plugin.xml, .github/workflows/presubmit.yaml, '
551- 'and resources/liveTemplates/flutter_miscellaneous.xml files for the '
552- 'Flutter plugin.\n The plugin.xml.template and product-matrix.json are '
553- 'used as input.' ;
544+ 'and resources/liveTemplates/flutter_miscellaneous.xml files for the '
545+ 'Flutter plugin.\n The plugin.xml.template and product-matrix.json are '
546+ 'used as input.' ;
554547
555548 @override
556549 Future <int > doit () async {
@@ -578,7 +571,7 @@ class GenerateCommand extends ProductCommand {
578571 .cast <File >()
579572 .toList ();
580573 final templateFile =
581- File (p.join ('resources' , 'liveTemplates' , 'flutter_miscellaneous.xml' ));
574+ File (p.join ('resources' , 'liveTemplates' , 'flutter_miscellaneous.xml' ));
582575 var contents = templateFile.readAsStringSync ();
583576
584577 log ('writing ${p .relative (templateFile .path )}' );
@@ -596,8 +589,7 @@ class GenerateCommand extends ProductCommand {
596589 final regexp = RegExp ('<template name="$name " value="([^"]+)"' );
597590 final match = regexp.firstMatch (contents);
598591 if (match == null ) {
599- throw 'No entry found for "$name " live template in ${templateFile
600- .path }' ;
592+ throw 'No entry found for "$name " live template in ${templateFile .path }' ;
601593 }
602594
603595 // Replace the existing content in the xml live template file with the
0 commit comments