cordova compiler options
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/7b392805 Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/7b392805 Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/7b392805 Branch: refs/heads/cordova Commit: 7b392805fa164725385cc42528179b568202cf97 Parents: b0f9dfe Author: Alex Harui <[email protected]> Authored: Mon Jun 12 21:31:22 2017 -0700 Committer: Alex Harui <[email protected]> Committed: Mon Jun 12 21:31:22 2017 -0700 ---------------------------------------------------------------------- .../driver/js/goog/JSGoogConfiguration.java | 49 ++++++++++++++++++++ .../flex2/compiler/common/Configuration.java | 31 +++++++++++++ 2 files changed, 80 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/7b392805/compiler-jx/src/main/java/org/apache/flex/compiler/internal/driver/js/goog/JSGoogConfiguration.java ---------------------------------------------------------------------- diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/driver/js/goog/JSGoogConfiguration.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/driver/js/goog/JSGoogConfiguration.java index 318c90b..abea342 100644 --- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/driver/js/goog/JSGoogConfiguration.java +++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/driver/js/goog/JSGoogConfiguration.java @@ -30,6 +30,7 @@ import java.util.Set; import org.apache.flex.compiler.clients.JSConfiguration; import org.apache.flex.compiler.clients.MXMLJSC; +import org.apache.flex.compiler.clients.MXMLJSC.JSTargetType; import org.apache.flex.compiler.config.ConfigurationValue; import org.apache.flex.compiler.exceptions.ConfigurationException; import org.apache.flex.compiler.internal.config.annotations.Arguments; @@ -402,5 +403,53 @@ public class JSGoogConfiguration extends JSConfiguration keepCodeWithMetadata.addAll(values); } + // + // 'cordova-platforms' option + // + + protected final List<String> cordovaPlatforms = new ArrayList<String>(); + + public List<String> getCordovaPlatforms() + { + if (cordovaPlatforms.size() == 0) + cordovaPlatforms.add("android"); + return cordovaPlatforms; + } + + /** + * The list of cordova platforms outputs to generate + */ + @Config(allowMultiple = true, isPath = false) + @Mapping({ "cordova-platforms" }) + @Arguments("platform") + @InfiniteArguments + public void setCordovaPlatforms(ConfigurationValue cv, String[] platformlist) + { + cordovaPlatforms.clear(); + for (String platform : platformlist) + cordovaPlatforms.add(platform); + } + + // 'cordova-id' option + // + + private String cordovaid = "org.apache.flexjs"; + + public String getCordovaId() + { + return cordovaid; + } + + /** + * Specify the id of the cordova app. The project name is appended. + */ + @Config(advanced = true) + @Mapping({ "cordova-id" }) + public void setCordovaId(ConfigurationValue cv, String id) + { + this.cordovaid = id; + } + + } http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/7b392805/flex-compiler-oem/src/main/java/flex2/compiler/common/Configuration.java ---------------------------------------------------------------------- diff --git a/flex-compiler-oem/src/main/java/flex2/compiler/common/Configuration.java b/flex-compiler-oem/src/main/java/flex2/compiler/common/Configuration.java index d005472..1bc9931 100644 --- a/flex-compiler-oem/src/main/java/flex2/compiler/common/Configuration.java +++ b/flex-compiler-oem/src/main/java/flex2/compiler/common/Configuration.java @@ -2315,6 +2315,37 @@ public class Configuration implements LinkerConfiguration, Cloneable } } + // + // 'cordova.platforms' option + // + + private List<String> cordovaPlatforms = new LinkedList<String>(); + + public List<String> getCordovaPlatforms() + { + return cordovaPlatforms; + } + + public void cfgCordovaPlatforms( ConfigurationValue cv, List<String> platforms ) + { + this.cordovaPlatforms = platforms; + } + + // + // 'cordova.id' option + // + + private String cordovaId = null; + + public String getCordovaId() + { + return cordovaId; + } + + public void cfgCordovaId( ConfigurationValue cv, String id ) + { + this.cordovaId = id; + } @Override public Configuration clone()
