You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2014/11/10 16:25:49 UTC
git commit: [flex-falcon] [refs/heads/feature/flex-tool-api] - -
Adjusted the implementation to the updated flex-tool-api version (Contains an
abstract base FlexToolGroup). - Made the build include the ServiceLoader
config files into the final jars.
Repository: flex-falcon
Updated Branches:
refs/heads/feature/flex-tool-api 3afa07b4e -> 8dec67448
- Adjusted the implementation to the updated flex-tool-api version (Contains an abstract base FlexToolGroup).
- Made the build include the ServiceLoader config files into the final jars.
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/8dec6744
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/8dec6744
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/8dec6744
Branch: refs/heads/feature/flex-tool-api
Commit: 8dec67448256e2185a9441b74d6bcc484d74a4ad
Parents: 3afa07b
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Mon Nov 10 16:25:42 2014 +0100
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Mon Nov 10 16:25:42 2014 +0100
----------------------------------------------------------------------
compiler.jx/build.xml | 5 +-
.../org.apache.flex.tools.FlexToolGroup | 2 +
.../flex/compiler/clients/FlexJSToolGroup.java | 56 ++++++++-----------
.../flex/compiler/clients/VF2JSToolGroup.java | 57 ++++++++-----------
compiler/build.xml | 5 +-
compiler/downloads.xml | 4 +-
.../flex/compiler/clients/FalconToolGroup.java | 58 +++++++++-----------
7 files changed, 85 insertions(+), 102 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/8dec6744/compiler.jx/build.xml
----------------------------------------------------------------------
diff --git a/compiler.jx/build.xml b/compiler.jx/build.xml
index 9a37be9..1f6b4e1 100644
--- a/compiler.jx/build.xml
+++ b/compiler.jx/build.xml
@@ -63,6 +63,9 @@
<file name="compiler.jar" />
</filelist>
</copy>
+ <!-- Copy the config file for the flex-tool-api. -->
+ <copy todir="${classes.dir}/META-INF/services"
+ file="src/META-INF/services/org.apache.flex.tools.FlexToolGroup"/>
</target>
<target name="compile">
@@ -90,7 +93,7 @@
<echo message="Building ${jsc.jar}" />
<jar file="${jsc.jar}" basedir="${classes.dir}"
- includes="**/*.properties,org/apache/**/*"
+ includes="**/*.properties,org/apache/**/*,META-INF/**/*"
excludes="**/JSDriver*,**/IASNodeAdapter*,org/apache/flex/compiler/internal/parsing/abc/*" >
<manifest>
<attribute name="Class-Path" value="${jar.classpath}" />
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/8dec6744/compiler.jx/src/META-INF/services/org.apache.flex.tools.FlexToolGroup
----------------------------------------------------------------------
diff --git a/compiler.jx/src/META-INF/services/org.apache.flex.tools.FlexToolGroup b/compiler.jx/src/META-INF/services/org.apache.flex.tools.FlexToolGroup
new file mode 100644
index 0000000..b2ad16f
--- /dev/null
+++ b/compiler.jx/src/META-INF/services/org.apache.flex.tools.FlexToolGroup
@@ -0,0 +1,2 @@
+org.apache.flex.compiler.clients.FlexJSToolGroup
+org.apache.flex.compiler.clients.VF2JSToolGroup
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/8dec6744/compiler.jx/src/org/apache/flex/compiler/clients/FlexJSToolGroup.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/clients/FlexJSToolGroup.java b/compiler.jx/src/org/apache/flex/compiler/clients/FlexJSToolGroup.java
index e0becfc..1f10aa7 100644
--- a/compiler.jx/src/org/apache/flex/compiler/clients/FlexJSToolGroup.java
+++ b/compiler.jx/src/org/apache/flex/compiler/clients/FlexJSToolGroup.java
@@ -1,44 +1,36 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
package org.apache.flex.compiler.clients;
import org.apache.flex.compiler.internal.driver.mxml.flexjs.MXMLFlexJSBackend;
-import org.apache.flex.tools.FlexTool;
-import org.apache.flex.tools.FlexToolGroup;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
+import org.apache.flex.tools.AbstractFlexToolGroup;
/**
* Created by christoferdutz on 10.11.14.
*/
-public class FlexJSToolGroup implements FlexToolGroup {
-
- Map<String, FlexTool> tools;
+public class FlexJSToolGroup extends AbstractFlexToolGroup {
public FlexJSToolGroup() {
- tools = new HashMap<String, FlexTool>();
- tools.put("COMPC", new COMPJSC(new MXMLFlexJSBackend()));
- tools.put("MXMLC", new MXMLJSC(new MXMLFlexJSBackend()));
- }
-
- @Override
- public String getName() {
- return "FlexJS";
- }
-
- @Override
- public Collection<String> getFlexToolNames() {
- return tools.keySet();
- }
-
- @Override
- public boolean hasFlexTool(String toolName) {
- return tools.containsKey(toolName);
- }
-
- @Override
- public FlexTool getFlexTool(String toolName) {
- return tools.get(toolName);
+ super("FlexJS");
+ addFlexTool(new COMPJSC(new MXMLFlexJSBackend()));
+ addFlexTool(new COMPJSC(new MXMLFlexJSBackend()));
}
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/8dec6744/compiler.jx/src/org/apache/flex/compiler/clients/VF2JSToolGroup.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/clients/VF2JSToolGroup.java b/compiler.jx/src/org/apache/flex/compiler/clients/VF2JSToolGroup.java
index 877ec9a..12500da 100644
--- a/compiler.jx/src/org/apache/flex/compiler/clients/VF2JSToolGroup.java
+++ b/compiler.jx/src/org/apache/flex/compiler/clients/VF2JSToolGroup.java
@@ -1,45 +1,36 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
package org.apache.flex.compiler.clients;
import org.apache.flex.compiler.internal.driver.js.vf2js.VF2JSBackend;
-import org.apache.flex.compiler.internal.driver.mxml.flexjs.MXMLFlexJSBackend;
-import org.apache.flex.tools.FlexTool;
-import org.apache.flex.tools.FlexToolGroup;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
+import org.apache.flex.tools.AbstractFlexToolGroup;
/**
* Created by christoferdutz on 10.11.14.
*/
-public class VF2JSToolGroup implements FlexToolGroup {
-
- Map<String, FlexTool> tools;
+public class VF2JSToolGroup extends AbstractFlexToolGroup {
public VF2JSToolGroup() {
- tools = new HashMap<String, FlexTool>();
- tools.put("COMPC", new COMPJSC(new VF2JSBackend()));
- tools.put("MXMLC", new MXMLJSC(new VF2JSBackend()));
- }
-
- @Override
- public String getName() {
- return "VF2JS";
- }
-
- @Override
- public Collection<String> getFlexToolNames() {
- return tools.keySet();
- }
-
- @Override
- public boolean hasFlexTool(String toolName) {
- return tools.containsKey(toolName);
- }
-
- @Override
- public FlexTool getFlexTool(String toolName) {
- return tools.get(toolName);
+ super("VF2JS");
+ addFlexTool(new COMPJSC(new VF2JSBackend()));
+ addFlexTool(new COMPJSC(new VF2JSBackend()));
}
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/8dec6744/compiler/build.xml
----------------------------------------------------------------------
diff --git a/compiler/build.xml b/compiler/build.xml
index 7c0172e..30e0bbb 100644
--- a/compiler/build.xml
+++ b/compiler/build.xml
@@ -556,6 +556,9 @@
<copy todir="${compiler}/generated/classes">
<fileset dir="${compiler}/src" includes="**/*.properties"/>
</copy>
+ <!-- Copy the config file for the flex-tool-api. -->
+ <copy todir="${compiler}/generated/classes/META-INF/services"
+ file="src/META-INF/services/org.apache.flex.tools.FlexToolGroup"/>
</target>
<target name="set.messages.en.uptodate">
@@ -599,7 +602,7 @@
<target name="compiler.jar" depends="compile, localization, version-info, set.compiler.jar.uptodate" unless="compiler.jar.uptodate"
description="Builds compiler.jar">
<mkdir dir="${sdk}/lib"/>
- <jar file="${sdk}/lib/compiler.jar" basedir="${compiler}/generated/classes" includes="**/*.properties,org/apache/**/*" excludes="${compiler.ant.binaries},${compiler.font.binaries}">
+ <jar file="${sdk}/lib/compiler.jar" basedir="${compiler}/generated/classes" includes="**/*.properties,org/apache/**/*,META-INF/**/*" excludes="${compiler.ant.binaries},${compiler.font.binaries}">
<manifest>
<attribute name="Sealed" value="${manifest.sealed}"/>
<attribute name="Implementation-Title" value="${manifest.Implementation-Title}"/>
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/8dec6744/compiler/downloads.xml
----------------------------------------------------------------------
diff --git a/compiler/downloads.xml b/compiler/downloads.xml
index 0d0f166..d1b4d6a 100644
--- a/compiler/downloads.xml
+++ b/compiler/downloads.xml
@@ -224,8 +224,8 @@
<param name="name" value="${flexToolApi.name}"/>
<param name="src.server" value="http://repository.apache.org/content/groups/snapshots"/>
<param name="src.folder" value="org/apache/flex/flex-tool-api/${flexToolApi.version}"/>
- <param name="src.filename" value="flex-tool-api-1.0.0-20141110.124753-2.jar"/>
- <param name="src.checksum" value="7a5edb19de574319862623f28dcb8e33"/>
+ <param name="src.filename" value="flex-tool-api-1.0.0-20141110.132854-7.jar"/>
+ <param name="src.checksum" value="ea3468a0af7f7b5ef6a3bf91d768c78d"/>
<param name="dest.folder" value=""/>
<param name="dest.filename" value="${flexToolApi.name}.jar"/>
<param name="license.use.apache" value="true"/>
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/8dec6744/compiler/src/org/apache/flex/compiler/clients/FalconToolGroup.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/clients/FalconToolGroup.java b/compiler/src/org/apache/flex/compiler/clients/FalconToolGroup.java
index ce859e1..3410bd0 100644
--- a/compiler/src/org/apache/flex/compiler/clients/FalconToolGroup.java
+++ b/compiler/src/org/apache/flex/compiler/clients/FalconToolGroup.java
@@ -1,44 +1,36 @@
-package org.apache.flex.compiler.clients;
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
-import org.apache.flex.tools.FlexTool;
-import org.apache.flex.tools.FlexToolGroup;
+package org.apache.flex.compiler.clients;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
+import org.apache.flex.tools.AbstractFlexToolGroup;
/**
* FlexToolGroup exposing the implementations of the Falcon compilers tools.
*/
-public class FalconToolGroup implements FlexToolGroup {
-
- Map<String, FlexTool> tools;
+public class FalconToolGroup extends AbstractFlexToolGroup {
public FalconToolGroup() {
- tools = new HashMap<String, FlexTool>();
- tools.put("COMPC", new COMPC());
- tools.put("MXMLC", new MXMLC());
- tools.put("OPTIMIZER", new Optimizer());
- }
-
- @Override
- public String getName() {
- return "Falcon";
- }
-
- @Override
- public Collection<String> getFlexToolNames() {
- return tools.keySet();
- }
-
- @Override
- public boolean hasFlexTool(String toolName) {
- return tools.containsKey(toolName);
- }
-
- @Override
- public FlexTool getFlexTool(String toolName) {
- return tools.get(toolName);
+ super("Falcon");
+ addFlexTool(new COMPC());
+ addFlexTool(new MXMLC());
+ addFlexTool(new Optimizer());
}
}