- Removed the references to VanillaSDK
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/d540503b Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/d540503b Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/d540503b Branch: refs/heads/feature-autobuild/example-maven-dirs Commit: d540503b10583c225d6420f84955d6f83451f230 Parents: bf093cb Author: Christofer Dutz <christofer.d...@codecentric.de> Authored: Mon Oct 31 17:16:41 2016 +0100 Committer: Christofer Dutz <christofer.d...@codecentric.de> Committed: Mon Oct 31 17:16:41 2016 +0100 ---------------------------------------------------------------------- .../codegen/js/goog/JSGoogPublisher.java | 6 -- .../mxml/flexjs/MXMLFlexJSPublisher.java | 71 ++++++++------------ 2 files changed, 29 insertions(+), 48 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d540503b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java ---------------------------------------------------------------------- diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java index 6dbe8d7..1a9994d 100644 --- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java +++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java @@ -97,9 +97,6 @@ public class JSGoogPublisher extends JSPublisher implements IJSPublisher final File closureGoogTgtLibDir = new File(intermediateDirPath, "/library/closure/goog"); final File closureTPSrcLibDir = new File(closureLibDir, "/third_party/closure/goog/"); final File closureTPTgtLibDir = new File(intermediateDirPath, "/library/third_party/closure/goog"); - // FIXME: What's the VanillaSDK? - final List<String> vanillaSDKSrcLibDirPath = googConfiguration.getSDKJSLib(); - final File vanillaSDKTgtLibDir = new File(intermediateDirPath, "/VanillaSDK"); final File depsSrcFile = new File(intermediateDirPath, "/library/closure/goog/deps.js"); final File depsTgtFile = new File(intermediateDirPath, "/deps.js"); @@ -108,9 +105,6 @@ public class JSGoogPublisher extends JSPublisher implements IJSPublisher appendExportSymbol(projectIntermediateJSFile, projectName); - // FIXME: What's the VanillaSDK? - copyFile(new File(vanillaSDKSrcLibDirPath.get(0)), vanillaSDKTgtLibDir); - List<SourceFile> inputs = new ArrayList<SourceFile>(); Collection<File> files = FileUtils.listFiles( new File(intermediateDirPath), http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/d540503b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java ---------------------------------------------------------------------- diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java index d71543b..9bab09f 100644 --- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java +++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java @@ -92,16 +92,16 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements IJSPublisher private boolean isMarmotinniRun; private String outputPathParameter; private boolean useStrictPublishing; - private String closureLibDirPath; @Override public File getOutputFolder() { + // Marmotinni is our test-framework. In case of a Marmotinni build + // we need to output the code to a different location. // (erikdebruin) - If there is a -marmotinni switch, we want // the output redirected to the directory it specifies. // - If there is an -output switch, use that path as the // output parent folder. - // FIXME: What is marmotinni? if (isMarmotinniRun) { outputParentFolder = new File(googConfiguration.getMarmotinni()); @@ -167,6 +167,7 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements IJSPublisher // is not set, check if its content is available in the classpath. If // it is found in the classpath, dump it's content to the filesystem and // pass the files in to the compiler directly. + String closureLibDirPath; if (googConfiguration.isClosureLibSet()) { closureLibDirPath = googConfiguration.getClosureLib(); @@ -209,15 +210,9 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements IJSPublisher if (!googConfiguration.getSkipTranspile()) { appendEncodedCSS(projectIntermediateJSFile, projectName); - - // if (!subsetGoog) - // { - // (erikdebruin) We need to leave the 'goog' files and dependencies well - // enough alone. We copy the entire library over so the - // 'goog' dependencies will resolve without our help. -// TODO: Check if this is needed. + // Copy the closure lib code to the debug-js directory. +// TODO: Re-Include this as this is needed by the Ant scripts // FileUtils.copyDirectory(new File(closureGoogSrcLibDirPath), new File(closureGoogTgtLibDirPath)); - // } } // Iterate over all swc dependencies and add all the externs they contain. @@ -525,50 +520,42 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements IJSPublisher { for (ICSSPropertyValue value : ((CSSArrayPropertyValue)prop).getElements()) { - CSSFunctionCallPropertyValue fn = (CSSFunctionCallPropertyValue)value; - String fontPath = fn.rawArguments; - if (fontPath.startsWith("'")) - fontPath = fontPath.substring(1, fontPath.length() - 1); - if (fontPath.startsWith("\"")) - fontPath = fontPath.substring(1, fontPath.length() - 1); - int c = fontPath.indexOf("?"); - if (c != -1) - fontPath = fontPath.substring(0, c); - File fontFile = new File(dir, fontPath); - File destFile = new File(targetDir, fontPath); - if (fontFile.exists()) - { - if (!destFile.exists()) - FileUtils.copyFile(fontFile, destFile); - } + copyFontFile((CSSFunctionCallPropertyValue) value, dir, targetDir); } } else { if (prop instanceof CSSFunctionCallPropertyValue) { - CSSFunctionCallPropertyValue fn = (CSSFunctionCallPropertyValue)prop; - String fontPath = fn.rawArguments; - if (fontPath.startsWith("'")) - fontPath = fontPath.substring(1, fontPath.length() - 1); - if (fontPath.startsWith("\"")) - fontPath = fontPath.substring(1, fontPath.length() - 1); - int c = fontPath.indexOf("?"); - if (c != -1) - fontPath = fontPath.substring(0, c); - File fontFile = new File(dir, fontPath); - File destFile = new File(targetDir, fontPath); - if (fontFile.exists()) - { - if (!destFile.exists()) - FileUtils.copyFile(fontFile, destFile); - } + copyFontFile((CSSFunctionCallPropertyValue) prop, dir, targetDir); } } } } } + protected void copyFontFile(CSSFunctionCallPropertyValue fn, File sourceDir, File targetDir) throws IOException { + String fontPath = fn.rawArguments; + if (fontPath.startsWith("'")) { + fontPath = fontPath.substring(1, fontPath.length() - 1); + } + if (fontPath.startsWith("\"")) { + fontPath = fontPath.substring(1, fontPath.length() - 1); + } + int c = fontPath.indexOf("?"); + if (c != -1) { + fontPath = fontPath.substring(0, c); + } + File fontFile = new File(sourceDir, fontPath); + File destFile = new File(targetDir, fontPath); + if (fontFile.exists()) + { + if (!destFile.exists()) { + FileUtils.copyFile(fontFile, destFile); + } + } + } + protected File getJarThatContainsClasspathResources(String resourcePath) { URL resource = Thread.currentThread().getContextClassLoader().getResource(resourcePath); if (resource != null) {