This is an automated email from the ASF dual-hosted git repository.
joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
The following commit(s) were added to refs/heads/develop by this push:
new fe0f4b2 royale-maven-plugin: fixed issue where includeLibrary()
included all libraries for both JS and SWF
fe0f4b2 is described below
commit fe0f4b22e7880308331865ec6b69a91646dc5304
Author: Josh Tynjala <[email protected]>
AuthorDate: Tue Mar 23 13:16:48 2021 -0700
royale-maven-plugin: fixed issue where includeLibrary() included all
libraries for both JS and SWF
Depending on the ordering of the libraries, this could cause the build to
fail for the same set of libraries. Now, it differentiates between JS and SWF
based on the Type enum
---
.../java/org/apache/royale/maven/CompileASDocMojo.java | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git
a/royale-maven-plugin/src/main/java/org/apache/royale/maven/CompileASDocMojo.java
b/royale-maven-plugin/src/main/java/org/apache/royale/maven/CompileASDocMojo.java
index b9424b9..297cd05 100644
---
a/royale-maven-plugin/src/main/java/org/apache/royale/maven/CompileASDocMojo.java
+++
b/royale-maven-plugin/src/main/java/org/apache/royale/maven/CompileASDocMojo.java
@@ -20,6 +20,7 @@
package org.apache.royale.maven;
import org.apache.flex.tools.FlexTool;
+import org.apache.maven.artifact.Artifact;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
@@ -159,6 +160,23 @@ public class CompileASDocMojo
return defines;
}
+ @Override
+ protected boolean includeLibrary(Artifact library) {
+ switch (type.get()) {
+ case SWF: {
+ String classifier = library.getClassifier();
+ return "swf".equalsIgnoreCase(classifier) ||
+ ((classifier == null) &&
"runtime".equalsIgnoreCase(library.getScope()));
+ }
+ case JS: {
+ String classifier = library.getClassifier();
+ return "typedefs".equalsIgnoreCase(classifier) ||
+ "js".equalsIgnoreCase(classifier);
+ }
+ }
+ return false;
+ }
+
private enum Type {
SWF,
JS