flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cd...@apache.org
Subject git commit: [flex-falcon] [refs/heads/develop] - - Added support of scope "theme" to allow providing themes to the compiler
Date Tue, 05 Jul 2016 12:36:45 GMT
Repository: flex-falcon
Updated Branches:
  refs/heads/develop f6fc72abc -> fe642a9b0


- Added support of scope "theme" to allow providing themes to the compiler


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/fe642a9b
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/fe642a9b
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/fe642a9b

Branch: refs/heads/develop
Commit: fe642a9b0c21968c6b3b69f386641a88d970b064
Parents: f6fc72a
Author: Christofer Dutz <christofer.dutz@codecentric.de>
Authored: Tue Jul 5 14:36:36 2016 +0200
Committer: Christofer Dutz <christofer.dutz@codecentric.de>
Committed: Tue Jul 5 14:36:36 2016 +0200

----------------------------------------------------------------------
 .../org/apache/flex/maven/flexjs/BaseMojo.java  | 12 +++++++++
 .../config/compile-app-flash-config.xml         | 28 +++++++++++---------
 .../main/resources/config/compile-as-config.xml |  5 ++++
 3 files changed, 33 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/fe642a9b/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/BaseMojo.java
----------------------------------------------------------------------
diff --git a/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/BaseMojo.java
b/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/BaseMojo.java
index 9a3ccff..e02f073 100644
--- a/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/BaseMojo.java
+++ b/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/BaseMojo.java
@@ -104,9 +104,11 @@ public abstract class BaseMojo
         List<Artifact> filteredLibraries = getFilteredLibraries(allLibraries);
         List<Artifact> libraries = getLibraries(filteredLibraries);
         List<Artifact> externalLibraries = getExternalLibraries(filteredLibraries);
+        List<Artifact> themeLibraries = getThemeLibraries(filteredLibraries);
         List<String> sourcePaths = getSourcePaths();
         context.put("libraries", libraries);
         context.put("externalLibraries", externalLibraries);
+        context.put("themeLibraries", themeLibraries);
         context.put("sourcePaths", sourcePaths);
         context.put("namespaces", getNamespaces());
         context.put("namespaceUris", getNamespaceUris());
@@ -282,6 +284,16 @@ public abstract class BaseMojo
         return Collections.emptyList();
     }
 
+    protected List<Artifact> getThemeLibraries(List<Artifact> artifacts) {
+        List<Artifact> themeLibraries = new LinkedList<Artifact>();
+        for(Artifact artifact : artifacts) {
+            if("theme".equalsIgnoreCase(artifact.getScope())) {
+                themeLibraries.add(artifact);
+            }
+        }
+        return themeLibraries;
+    }
+
     protected List<Artifact> getExternalLibraries(List<Artifact> artifacts) {
         List<Artifact> externalLibraries = new LinkedList<Artifact>();
         for(Artifact artifact : artifacts) {

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/fe642a9b/flexjs-maven-plugin/src/main/resources/config/compile-app-flash-config.xml
----------------------------------------------------------------------
diff --git a/flexjs-maven-plugin/src/main/resources/config/compile-app-flash-config.xml b/flexjs-maven-plugin/src/main/resources/config/compile-app-flash-config.xml
index 2b30745..c5bf8c4 100644
--- a/flexjs-maven-plugin/src/main/resources/config/compile-app-flash-config.xml
+++ b/flexjs-maven-plugin/src/main/resources/config/compile-app-flash-config.xml
@@ -1,5 +1,4 @@
 <?xml version="1.0"?>
-
 <!--
 
   Licensed to the Apache Software Foundation (ASF) under one or more
@@ -18,8 +17,6 @@
   limitations under the License.
 
 -->
-
-
 <flex-config>
   <!-- Specifies the version of the compiled SWF -->
   <swf-version>14</swf-version>
@@ -38,7 +35,7 @@
 
     <!-- List of path elements that form the roots of ActionScript class hierarchies.
-->
     <source-path>
-#foreach($sourcePath in $sourcePaths)           <path-element>$sourcePath</path-element>
+#foreach($sourcePath in $sourcePaths)      <path-element>$sourcePath</path-element>
 #end
     </source-path>
 
@@ -52,13 +49,6 @@
     <!-- Turn on generation of debuggable SWFs. False by default for mxmlc, -->
     <debug>$debug</debug>
 
-    <!-- List of SWC files or directories to compile against but to omit from -->
-    <!-- linking.                                                             -->
-    <external-library-path>
-#foreach($artifact in $externalLibraries)            <path-element>$artifact.file</path-element>
-#end
-    </external-library-path>
-
     <!-- Turn on writing of generated/*.as files to disk. These files are generated by
-->
     <!-- the compiler during mxml translation and are helpful with understanding and 
 -->
     <!-- debugging Flex applications.                                                
 -->
@@ -71,12 +61,25 @@
     </include-libraries>
     -->
 
+
     <!-- List of SWC files or directories that contain SWC files. -->
     <library-path>
-#foreach($artifact in $libraries)            <path-element>$artifact.file</path-element>
+#foreach($artifact in $libraries)      <path-element>$artifact.file</path-element>
 #end
     </library-path>
 
+    <!-- List of SWC files or directories to compile against but to omit from -->
+    <!-- linking.                                                             -->
+    <external-library-path>
+#foreach($artifact in $externalLibraries)      <path-element>$artifact.file</path-element>
+#end
+    </external-library-path>
+
+    <theme>
+#foreach($artifact in $themeLibraries)      <filename>$artifact.file</filename>
+#end
+    </theme>
+
     <mxml>
       <children-as-data>true</children-as-data>
       <imports>
@@ -86,6 +89,7 @@
         <implicit-import>org.apache.flex.core.IFactory</implicit-import>
       </imports>
     </mxml>
+
     <binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
     <binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
     <binding-value-change-event-type>valueChange</binding-value-change-event-type>

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/fe642a9b/flexjs-maven-plugin/src/main/resources/config/compile-as-config.xml
----------------------------------------------------------------------
diff --git a/flexjs-maven-plugin/src/main/resources/config/compile-as-config.xml b/flexjs-maven-plugin/src/main/resources/config/compile-as-config.xml
index bab6c6a..d04c33b 100644
--- a/flexjs-maven-plugin/src/main/resources/config/compile-as-config.xml
+++ b/flexjs-maven-plugin/src/main/resources/config/compile-as-config.xml
@@ -33,6 +33,11 @@
 #end
         </external-library-path>
 
+        <theme>
+#foreach($artifact in $themeLibraries)           <filename>$artifact.file</filename>
+#end
+        </theme>
+
         <source-path>
 #foreach($sourcePath in $sourcePaths)           <path-element>$sourcePath</path-element>
 #end


Mime
View raw message