This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch ReleaseModules
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git


The following commit(s) were added to refs/heads/ReleaseModules by this push:
     new a3ed139  fix up relative path in externs
a3ed139 is described below

commit a3ed1397e6688b31572380382f907f52f4921873
Author: Alex Harui <[email protected]>
AuthorDate: Sat Jan 22 21:16:16 2022 -0800

    fix up relative path in externs
---
 .../internal/driver/js/goog/JSGoogConfiguration.java         | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git 
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/goog/JSGoogConfiguration.java
 
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/goog/JSGoogConfiguration.java
index 1ef218c..3bf5239 100644
--- 
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/goog/JSGoogConfiguration.java
+++ 
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/goog/JSGoogConfiguration.java
@@ -318,6 +318,18 @@ public class JSGoogConfiguration extends JSConfiguration
     public void setJSCompilerOptions(ConfigurationValue cv, List<String> value)
             throws ConfigurationException
     {
+       String externs = "--externs ";
+       for (int i = 0; i < value.size(); i++)
+       {
+               String item = value.get(i);
+               if (item.startsWith(externs))
+               {
+                       String filePath = item.substring(externs.length());
+                       filePath = resolvePathStrict(filePath, cv);
+                       item = externs + filePath;
+                       value.set(i,  item);
+               }
+       }
        jsCompilerOptions.addAll(value);
     }
 

Reply via email to