From a0b8651fee9dca977c22a598d680746f1373e97c Mon Sep 17 00:00:00 2001 From: Christopher Vogt Date: Sun, 5 Mar 2017 06:30:03 -0500 Subject: improve whitespace readability in proguard plugin --- stage2/plugins/GeneratedSections.scala | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'stage2/plugins') diff --git a/stage2/plugins/GeneratedSections.scala b/stage2/plugins/GeneratedSections.scala index 417278c..dc065cf 100644 --- a/stage2/plugins/GeneratedSections.scala +++ b/stage2/plugins/GeneratedSections.scala @@ -26,14 +26,7 @@ trait GeneratedSections extends BaseBuild{ }.getOrElse(subject) } - val updated = sourceFiles.flatMap{ file => - val template = file.readAsString - val replaced = replaceSections( template, replacements ) - if( template != replaced ) { - write( file.toPath, replaced.getBytes ) - Some(file) - } else None - } + val updated = lib.transformFiles( sourceFiles, replaceSections( _, replacements ) ) logger.log("generated-sections","Updated:" + updated.map(_ ++ "\n").mkString) } -- cgit v1.2.3