From 15afa8b71c4a42c1969d58c0d35e1fc3a70b16ad Mon Sep 17 00:00:00 2001 From: Christopher Vogt Date: Wed, 1 Mar 2017 01:19:04 +0000 Subject: add comprehensive, type-safe proguard plugin this also demonstrates how to programmatically generate an extensive, type-safe api for a stringly-typed interface --- stage1/Stage1Lib.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stage1') diff --git a/stage1/Stage1Lib.scala b/stage1/Stage1Lib.scala index 71e6ee5..f2f468c 100644 --- a/stage1/Stage1Lib.scala +++ b/stage1/Stage1Lib.scala @@ -56,8 +56,8 @@ class Stage1Lib( logger: Logger ) extends BaseLib{ def write(file: File, content: String, options: OpenOption*): File = Stage0Lib.write(file, content, options:_*) - def download(url: URL, target: File, sha1: Option[String]): Boolean = { - if( target.exists ){ + def download(url: URL, target: File, sha1: Option[String], replace: Boolean = false): Boolean = { + if( target.exists && !replace ){ logger.resolver(green("found ") ++ url.string) true } else { -- cgit v1.2.3