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/04/12 15:05:26 UTC
[2/4] git commit: [FalconJX] added -marmotinni switch
[FalconJX] added -marmotinni switch
In order to facilitate a testing framework I'm trying to build I needed the ability to redirect MXMLJSC FlexJS output to somewhere other than the bin directory of the project. I introduced a new command line switch to make this and potentially other paths possible.
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/7d9a4616
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/7d9a4616
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/7d9a4616
Branch: refs/heads/develop
Commit: 7d9a4616570fb3431694fdbcdb3f713df0e497c3
Parents: 1b5195a
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Thu Apr 11 11:18:18 2013 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Apr 12 09:16:10 2013 +0200
----------------------------------------------------------------------
.../codegen/mxml/flexjs/MXMLFlexJSPublisher.java | 24 +++++++++++----
.../driver/js/goog/JSGoogConfiguration.java | 19 +++++++++++
2 files changed, 37 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/7d9a4616/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 d41f606..4681acf 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
@@ -32,21 +32,33 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
public static final String FLEXJS_INTERMEDIATE_DIR_NAME = "bin/js-debug";
public static final String FLEXJS_RELEASE_DIR_NAME = "bin/js-release";
- private File outputFolder;
+ private File outputParentFolder;
public MXMLFlexJSPublisher(Configuration config)
{
super(config);
-
- this.outputFolder = new File(configuration.getTargetFileDirectory())
- .getParentFile();
}
+ @Override
public File getOutputFolder()
{
- return new File(outputFolder, FLEXJS_INTERMEDIATE_DIR_NAME);
+ // (erikdebruin) If there is a -marmotinni switch, we want
+ // the output redirected to the directory it specifies.
+ JSGoogConfiguration jsGoogConfig = (JSGoogConfiguration) configuration;
+ if (jsGoogConfig.getMarmotinni() != null)
+ {
+ this.outputParentFolder = new File(jsGoogConfig.getMarmotinni());
+ }
+ else
+ {
+ this.outputParentFolder = new File(configuration.getTargetFileDirectory())
+ .getParentFile();
+ }
+
+ return new File(this.outputParentFolder, FLEXJS_INTERMEDIATE_DIR_NAME);
}
+ @Override
public void publish() throws IOException
{
final String intermediateDirPath = getOutputFolder().getPath();
@@ -56,7 +68,7 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
final String outputFileName = projectName
+ "." + JSSharedData.OUTPUT_EXTENSION;
- File releaseDir = new File(outputFolder, FLEXJS_RELEASE_DIR_NAME);
+ File releaseDir = new File(outputParentFolder, FLEXJS_RELEASE_DIR_NAME);
final String releaseDirPath = releaseDir.getPath();
if (releaseDir.exists())
org.apache.commons.io.FileUtils.deleteQuietly(releaseDir);
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/7d9a4616/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 eea0637..4426af6 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
@@ -63,6 +63,25 @@ public class JSGoogConfiguration extends JSConfiguration
}
//
+ // 'marmotinni'
+ //
+
+ private String marmotinni;
+
+ public String getMarmotinni()
+ {
+ return marmotinni;
+ }
+
+ @Config
+ @Mapping("marmotinni")
+ public void setMarmotinni(ConfigurationValue cv, String value)
+ throws ConfigurationException
+ {
+ marmotinni = value;
+ }
+
+ //
// 'sdk-js-lib'
//