You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by er...@apache.org on 2013/11/13 11:52:27 UTC
[8/9] git commit: [flex-falcon] [refs/heads/develop] - Added
'-strict-publish' argument. Made the use of strict compiler flags when
publishing optional.
Added '-strict-publish' argument. Made the use of strict compiler flags when publishing optional.
Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/39e91cb7
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/39e91cb7
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/39e91cb7
Branch: refs/heads/develop
Commit: 39e91cb751b522be38fbb7167aa27caf9dde1e1b
Parents: f4644e3
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Wed Nov 13 11:39:05 2013 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Wed Nov 13 11:39:05 2013 +0100
----------------------------------------------------------------------
.../mxml/flexjs/MXMLFlexJSPublisher.java | 30 ++++++++++++--------
.../driver/js/goog/JSGoogConfiguration.java | 19 +++++++++++++
2 files changed, 37 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/39e91cb7/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
index beb9764..34438a2 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
@@ -45,12 +45,17 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
this.isMarmotinniRun = ((JSGoogConfiguration) configuration)
.getMarmotinni() != null;
+
+ this.useStrictPublishing = ((JSGoogConfiguration) configuration)
+ .getStrictPublish();
+
this.project = project;
}
private FlexJSProject project;
private boolean isMarmotinniRun;
+ private boolean useStrictPublishing;
@Override
public File getOutputFolder()
@@ -223,18 +228,19 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
optionList.add("--js=" + file.getCanonicalPath());
}
- // (erikdebruin) set compiler flags to 'strictest' to allow maximum
- // code optimization
- // start 'really strict'
- optionList.add("--define='goog.DEBUG=false'");
- optionList.add("--language_in=ECMASCRIPT5_STRICT");
- optionList.add("--warning_level=VERBOSE");
- optionList.add("--jscomp_warning=accessControls");
- optionList.add("--jscomp_warning=const");
- optionList.add("--jscomp_warning=constantProperty");
- optionList.add("--jscomp_warning=strictModuleDepCheck");
- optionList.add("--jscomp_warning=visibility");
- // end 'really strict'
+ if (useStrictPublishing)
+ {
+ // (erikdebruin) set compiler flags to 'strictest' to allow maximum
+ // code optimization
+ optionList.add("--define='goog.DEBUG=false'");
+ optionList.add("--language_in=ECMASCRIPT5_STRICT");
+ optionList.add("--warning_level=VERBOSE");
+ optionList.add("--jscomp_warning=accessControls");
+ optionList.add("--jscomp_warning=const");
+ optionList.add("--jscomp_warning=constantProperty");
+ optionList.add("--jscomp_warning=strictModuleDepCheck");
+ optionList.add("--jscomp_warning=visibility");
+ }
optionList.add("--closure_entry_point=" + projectName);
optionList.add("--only_closure_dependencies");
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/39e91cb7/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/goog/JSGoogConfiguration.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/goog/JSGoogConfiguration.java b/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/goog/JSGoogConfiguration.java
index 30ccd5b..4e04254 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/goog/JSGoogConfiguration.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/goog/JSGoogConfiguration.java
@@ -105,4 +105,23 @@ public class JSGoogConfiguration extends JSConfiguration
sdkJSLib.addAll(value);
}
+ //
+ // 'strict-publish'
+ //
+
+ private boolean strictPublish;
+
+ public boolean getStrictPublish()
+ {
+ return strictPublish;
+ }
+
+ @Config
+ @Mapping("strict-publish")
+ public void setStrictPublish(ConfigurationValue cv, boolean value)
+ throws ConfigurationException
+ {
+ strictPublish = value;
+ }
+
}