diff options
author | Jon Brandvein <brandjon@google.com> | 2016-12-19 23:58:13 +0000 |
---|---|---|
committer | Yue Gan <yueg@google.com> | 2016-12-20 06:13:41 +0000 |
commit | 733baeda5a300ac31f1b7bfb85f4d7c4b13f1357 (patch) | |
tree | 4bce6059157dc219ead7f11ec710dbeb5decee81 /src/main/java/com/google/devtools/build/lib/rules/java/ProguardHelper.java | |
parent | c22a5c7a2e6690a55b7bad06f41b08160875899f (diff) |
Update call sites to FileWriteAction to use the --experimental_transparent_compression flag
Also add test to ensure lazy strings aren't forced.
--
PiperOrigin-RevId: 142496520
MOS_MIGRATED_REVID=142496520
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/java/ProguardHelper.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/java/ProguardHelper.java | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/ProguardHelper.java b/src/main/java/com/google/devtools/build/lib/rules/java/ProguardHelper.java index dcae77b534..13575580e9 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/ProguardHelper.java +++ b/src/main/java/com/google/devtools/build/lib/rules/java/ProguardHelper.java @@ -251,11 +251,11 @@ public abstract class ProguardHelper { Artifact implicitDirectives = getProguardConfigArtifact(ruleContext, optMode.name().toLowerCase()); ruleContext.registerAction( - new FileWriteAction( - ruleContext.getActionOwner(), + FileWriteAction.create( + ruleContext, implicitDirectives, optMode.getImplicitProguardDirectives(), - /*executable*/ false)); + /*makeExecutable=*/ false)); builder.add(implicitDirectives); } @@ -270,15 +270,13 @@ public abstract class ProguardHelper { RuleContext ruleContext, String mainClassName) { Artifact result = ProguardHelper.getProguardConfigArtifact(ruleContext, "jvm"); ruleContext.registerAction( - new FileWriteAction( - ruleContext.getActionOwner(), + FileWriteAction.create( + ruleContext, result, String.format( - "-keep class %s {%n" - + " public static void main(java.lang.String[]);%n" - + "}", + "-keep class %s {%n public static void main(java.lang.String[]);%n}", mainClassName), - /*executable*/ false)); + /*makeExecutable=*/ false)); return result; } |