You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by gr...@apache.org on 2019/07/12 05:03:44 UTC
[royale-asjs] 01/02: Improvements to maven builds,
and got ant builds working for the 3 examples. Only one of these
(CruxQuickStartBasic) is both swf and javascript.
This is an automated email from the ASF dual-hosted git repository.
gregdove pushed a commit to branch feature/Crux
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit f1b57c32bf1cafb150f48e7b13bde6c1c5f92775
Author: greg-dove <gr...@gmail.com>
AuthorDate: Fri Jul 12 16:23:56 2019 +1200
Improvements to maven builds, and got ant builds working for the 3 examples. Only one of these (CruxQuickStartBasic) is both swf and javascript.
---
examples/build.xml | 9 ++
examples/build_example.xml | 14 +++
examples/crux/CruxQuickStart/build.xml | 6 +-
examples/crux/CruxQuickStart/pom.xml | 37 +-------
.../src/main/config/compile-app-config.xml | 32 +++++--
examples/crux/CruxQuickStartBasic/build.xml | 4 +-
examples/crux/CruxQuickStartBasic/pom.xml | 20 +----
.../src/main/config/compile-app-config.xml | 37 ++++++++
examples/crux/GitHubCommitLogViewer/build.xml | 4 +-
examples/crux/GitHubCommitLogViewer/pom.xml | 100 ++++++++++-----------
.../src/main/config/compile-app-config.xml | 52 ++++++-----
11 files changed, 175 insertions(+), 140 deletions(-)
diff --git a/examples/build.xml b/examples/build.xml
index ea1de10..e433226 100644
--- a/examples/build.xml
+++ b/examples/build.xml
@@ -78,6 +78,9 @@
<ant dir="${basedir}/express/DataBindingExample"/>
<ant dir="${basedir}/express/DataGridExample"/>
<ant dir="${basedir}/express/GitHubCommitLogViewer"/>
+ <ant dir="${basedir}/crux/CruxQuickStart"/>
+ <ant dir="${basedir}/crux/CruxQuickStartBasic"/>
+ <ant dir="${basedir}/crux/GitHubCommitLogViewer"/>
<ant dir="${basedir}/royale/AccordionExample"/>
<ant dir="${basedir}/royale/ASDoc"/>
<ant dir="${basedir}/royale/CordovaCameraExample"/>
@@ -136,6 +139,9 @@
<ant dir="${basedir}/express/DataBindingExample" target="clean"/>
<ant dir="${basedir}/express/DataGridExample" target="clean"/>
<ant dir="${basedir}/express/GitHubCommitLogViewer" target="clean"/>
+ <ant dir="${basedir}/crux/CruxQuickStart" target="clean"/>
+ <ant dir="${basedir}/crux/CruxQuickStartBasic" target="clean"/>
+ <ant dir="${basedir}/crux/GitHubCommitLogViewer" target="clean"/>
<ant dir="${basedir}/royale/AccordionExample" target="clean"/>
<ant dir="${basedir}/royale/ASDoc" target="clean"/>
<ant dir="${basedir}/royale/CordovaCameraExample" target="clean"/>
@@ -182,6 +188,9 @@
<target name="examine" description="Cleans all SWCs and their resource bundles">
<ant dir="${basedir}/express/DataBindingExample" target="examine"/>
<ant dir="${basedir}/express/DataGridExample" target="examine"/>
+ <ant dir="${basedir}/crux/CruxQuickStart" target="examine"/>
+ <ant dir="${basedir}/crux/CruxQuickStartBasic" target="examine"/>
+ <ant dir="${basedir}/crux/GitHubCommitLogViewer" target="examine"/>
<ant dir="${basedir}/royale/AccordionExample" target="examine"/>
<ant dir="${basedir}/royale/ASDoc" target="examine"/>
<ant dir="${basedir}/royale/CordovaCameraExample" target="examine"/>
diff --git a/examples/build_example.xml b/examples/build_example.xml
index 78ab79c..279db85 100644
--- a/examples/build_example.xml
+++ b/examples/build_example.xml
@@ -189,6 +189,20 @@
<arg value="${playerglobal_arg}" />
</mxmlc>
</target>
+
+
+ <!-- support for skipping swf build -->
+ <target name="compile-js-only">
+ <available file="${basedir}/src/main/config/compile-app-config.xml"
+ type="file"
+ property="optional_arg" value="-load-config+="${basedir}/src/main/config/compile-app-config.xml"" />
+
+ <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+ <property name="config_arg" value="royale" />
+ <property name="file_suffix" value="mxml" />
+ <property name="optional_arg" value="-define+=CONFIG::dummy,true" />
+ <antcall target="build_example.compile-js-release" />
+ </target>
<target name="check-air">
<condition property="is.air" value="true">
diff --git a/examples/crux/CruxQuickStart/build.xml b/examples/crux/CruxQuickStart/build.xml
index 9f06c9d..7b58753 100644
--- a/examples/crux/CruxQuickStart/build.xml
+++ b/examples/crux/CruxQuickStart/build.xml
@@ -19,7 +19,7 @@
-->
-<project name="Crux_QuickStart_Jewel" default="main" basedir=".">
+<project name="CruxQuickStart" default="main" basedir=".">
<property name="ROYALE_HOME" location="../../.."/>
<property name="example" value="CruxQuickStart" />
@@ -29,8 +29,10 @@
<property name="ROYALE_HOME" value="${ROYALE_HOME}"/>
<include file="${basedir}/../../build_example.xml" />
+
+
- <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
+ <target name="main" depends="clean,build_example.compile-js-only" description="Clean build of ${example}">
</target>
<target name="clean">
diff --git a/examples/crux/CruxQuickStart/pom.xml b/examples/crux/CruxQuickStart/pom.xml
index 4f4abcd..ad682b0 100644
--- a/examples/crux/CruxQuickStart/pom.xml
+++ b/examples/crux/CruxQuickStart/pom.xml
@@ -67,20 +67,6 @@
<dependencies>
<dependency>
<groupId>org.apache.royale.framework</groupId>
- <artifactId>Basic</artifactId>
- <version>0.9.6-SNAPSHOT</version>
- <type>swc</type>
- <classifier>swf</classifier>
- </dependency>
- <dependency>
- <groupId>org.apache.royale.framework</groupId>
- <artifactId>Basic</artifactId>
- <version>0.9.6-SNAPSHOT</version>
- <type>swc</type>
- <classifier>js</classifier>
- </dependency>
- <dependency>
- <groupId>org.apache.royale.framework</groupId>
<artifactId>Jewel</artifactId>
<version>0.9.6-SNAPSHOT</version>
<type>swc</type>
@@ -95,33 +81,12 @@
</dependency>
<dependency>
<groupId>org.apache.royale.framework</groupId>
- <artifactId>HTML</artifactId>
- <version>0.9.6-SNAPSHOT</version>
- <type>swc</type>
- <classifier>swf</classifier>
- </dependency>
- <dependency>
- <groupId>org.apache.royale.framework</groupId>
- <artifactId>HTML</artifactId>
- <version>0.9.6-SNAPSHOT</version>
- <type>swc</type>
- <classifier>js</classifier>
- </dependency>
- <dependency>
- <groupId>org.apache.royale.framework</groupId>
- <artifactId>Jewel-Light-NoFlat-Primary-Amethyst-Theme</artifactId>
+ <artifactId>JewelTheme</artifactId>
<version>0.9.6-SNAPSHOT</version>
<type>swc</type>
<scope>theme</scope>
<classifier>js</classifier>
</dependency>
- <dependency>
- <groupId>org.apache.royale.framework</groupId>
- <artifactId>BasicTheme</artifactId>
- <version>0.9.6-SNAPSHOT</version>
- <type>swc</type>
- <scope>theme</scope>
- </dependency>
</dependencies>
</project>
diff --git a/examples/crux/CruxQuickStart/src/main/config/compile-app-config.xml b/examples/crux/CruxQuickStart/src/main/config/compile-app-config.xml
index c29fa78..55973a2 100644
--- a/examples/crux/CruxQuickStart/src/main/config/compile-app-config.xml
+++ b/examples/crux/CruxQuickStart/src/main/config/compile-app-config.xml
@@ -20,22 +20,44 @@
<js-output-optimization>
<optimization>skipAsCoercions</optimization>
</js-output-optimization>
+ <js-default-initializers>true</js-default-initializers>
<compiler>
-
<targets>
<target>JSRoyale</target>
</targets>
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Transient</name>
+
+ <name>Inject</name>
+ <name>Dispatcher</name>
+ <name>EventHandler</name>
+ <name>PostConstruct</name>
+ <name>PreDestroy</name>
+ <name>ViewAdded</name>
+ <name>ViewRemoved</name>
+ </keep-as3-metadata>
+ <keep-code-with-metadata>
+ <name>Inject</name>
+ </keep-code-with-metadata>
+
<js-library-path append="true">
+ <path-element>../../../../../../frameworks/js/libs/BasicJS.swc</path-element>
<path-element>../../../../../../frameworks/js/libs/CruxJS.swc</path-element>
<path-element>../../../../../../frameworks/js/libs/MXRoyaleJS.swc</path-element>
</js-library-path>
-
+ <!--<library-path append="true">
+ <path-element>../../../../../../frameworks/libs/Basic.swc</path-element>
+ <path-element>../../../../../../frameworks/libs/Crux.swc</path-element>
+ <path-element>../../../../../../frameworks/libs/MXRoyale.swc</path-element>
+ </library-path>-->
<theme>
<filename>../../../../../../frameworks/libs/JewelTheme.swc</filename>
- <filename>../../../../../../frameworks/themes/Jewel-Light-NoFlat-Primary-Blue-Theme/src/main/resources/defaults.css</filename>
- <filename>../../../../../../frameworks/themes/Jewel-Light-NoFlat-Secondary-Topaz-Theme/src/main/resources/defaults.css</filename>
- <filename>../../../../../../frameworks/themes/Jewel-Light-NoFlat-Emphasized-Emerald-Theme/src/main/resources/defaults.css</filename>
</theme>
+ <exclude-defaults-css-files>
+ <!--<filename>MXRoyale.swc:defaults.css</filename>-->
+ <filename>MXRoyaleJS.swc:defaults.css</filename>
+ </exclude-defaults-css-files>
</compiler>
</royale-config>
diff --git a/examples/crux/CruxQuickStartBasic/build.xml b/examples/crux/CruxQuickStartBasic/build.xml
index 32fda02..60ff56d 100644
--- a/examples/crux/CruxQuickStartBasic/build.xml
+++ b/examples/crux/CruxQuickStartBasic/build.xml
@@ -19,9 +19,9 @@
-->
-<project name="Crux_QuickStart_Basic" default="main" basedir=".">
+<project name="CruxQuickStartBasic" default="main" basedir=".">
<property name="ROYALE_HOME" location="../../.."/>
- <property name="example" value="HelloWorld" />
+ <property name="example" value="CruxQuickStart" />
<property file="${ROYALE_HOME}/env.properties"/>
<property environment="env"/>
diff --git a/examples/crux/CruxQuickStartBasic/pom.xml b/examples/crux/CruxQuickStartBasic/pom.xml
index c00bba5..52bd6c8 100644
--- a/examples/crux/CruxQuickStartBasic/pom.xml
+++ b/examples/crux/CruxQuickStartBasic/pom.xml
@@ -52,11 +52,9 @@
-keep-code-with-metadata=Inject;
</additionalCompilerOptions>
<outputDirectory>${basedir}/target</outputDirectory>
- <!--<htmlTemplate>${ROYALE_HOME}/templates/swfobject/index.template.html</htmlTemplate>-->
<flashOutputFileName>swf/${project.artifactId}.swf</flashOutputFileName>
</configuration>
</plugin>
-
</plugins>
</build>
@@ -93,7 +91,7 @@
<includeEmptyDirs>true</includeEmptyDirs>
<resources>
<resource>
- <directory>${ROYALE_HOME}/templates/swfobject</directory>
+ <directory>${basedir}/../../../templates/swfobject</directory>
<filtering>true</filtering>
</resource>
</resources>
@@ -139,21 +137,7 @@
<type>swc</type>
<classifier>js</classifier>
</dependency>
- <dependency>
- <groupId>org.apache.royale.framework</groupId>
- <artifactId>HTML</artifactId>
- <version>0.9.6-SNAPSHOT</version>
- <type>swc</type>
- <classifier>swf</classifier>
- </dependency>
- <dependency>
- <groupId>org.apache.royale.framework</groupId>
- <artifactId>HTML</artifactId>
- <version>0.9.6-SNAPSHOT</version>
- <type>swc</type>
- <classifier>js</classifier>
- </dependency>
- <dependency>
+ <dependency>
<groupId>org.apache.royale.framework</groupId>
<artifactId>BasicTheme</artifactId>
<version>0.9.6-SNAPSHOT</version>
diff --git a/examples/crux/CruxQuickStartBasic/src/main/config/compile-app-config.xml b/examples/crux/CruxQuickStartBasic/src/main/config/compile-app-config.xml
index 47270ef..6505430 100644
--- a/examples/crux/CruxQuickStartBasic/src/main/config/compile-app-config.xml
+++ b/examples/crux/CruxQuickStartBasic/src/main/config/compile-app-config.xml
@@ -20,4 +20,41 @@
<js-output-optimization>
<optimization>skipAsCoercions</optimization>
</js-output-optimization>
+ <js-default-initializers>true</js-default-initializers>
+
+ <compiler>
+ <targets>
+ <target>JSRoyale</target>
+ <target>SWF</target>
+ </targets>
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Transient</name>
+
+ <name>Inject</name>
+ <name>Dispatcher</name>
+ <name>EventHandler</name>
+ <name>PostConstruct</name>
+ <name>PreDestroy</name>
+ <name>ViewAdded</name>
+ <name>ViewRemoved</name>
+ </keep-as3-metadata>
+ <keep-code-with-metadata>
+ <name>Inject</name>
+ </keep-code-with-metadata>
+
+ <js-library-path append="true">
+ <path-element>../../../../../../frameworks/js/libs/BasicJS.swc</path-element>
+ <path-element>../../../../../../frameworks/js/libs/CruxJS.swc</path-element>
+ <path-element>../../../../../../frameworks/js/libs/MXRoyaleJS.swc</path-element>
+ </js-library-path>
+ <library-path append="true">
+ <path-element>../../../../../../frameworks/libs/Basic.swc</path-element>
+ <path-element>../../../../../../frameworks/libs/Crux.swc</path-element>
+ <path-element>../../../../../../frameworks/libs/MXRoyale.swc</path-element>
+ </library-path>
+ <exclude-defaults-css-files>
+ <filename>MXRoyaleJS.swc:defaults.css</filename>
+ </exclude-defaults-css-files>
+ </compiler>
</royale-config>
diff --git a/examples/crux/GitHubCommitLogViewer/build.xml b/examples/crux/GitHubCommitLogViewer/build.xml
index f36e2cf..569cd44 100644
--- a/examples/crux/GitHubCommitLogViewer/build.xml
+++ b/examples/crux/GitHubCommitLogViewer/build.xml
@@ -29,8 +29,8 @@
<include file="${basedir}/../../build_example.xml" />
- <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
- <copy file="${basedir}/src/main/resources/project.json" tofile="${basedir}/bin-debug/project.json" />
+ <target name="main" depends="clean,build_example.compile-js-only" description="Clean build of ${example}">
+ <!--<copy file="${basedir}/src/main/resources/project.json" tofile="${basedir}/bin-debug/project.json" />-->
<copy file="${basedir}/src/main/resources/project.json" tofile="${basedir}/bin/js-debug/project.json" />
<copy file="${basedir}/src/main/resources/project.json" tofile="${basedir}/bin/js-release/project.json" />
</target>
diff --git a/examples/crux/GitHubCommitLogViewer/pom.xml b/examples/crux/GitHubCommitLogViewer/pom.xml
index be33914..1fe6ae7 100644
--- a/examples/crux/GitHubCommitLogViewer/pom.xml
+++ b/examples/crux/GitHubCommitLogViewer/pom.xml
@@ -101,9 +101,7 @@
<properties>
<!-- no point building the swf target yet, there is a bug in mx ObjectUtil somewhere -->
<royale.example.targets>JSRoyale</royale.example.targets>
- </properties>
- <!--<properties>
- <title>${project.artifactId}</title>
+ <!--<title>${project.artifactId}</title>
<bgcolor>#ffffff</bgcolor>
<useBrowserHistory>--</useBrowserHistory>
<version_major>11</version_major>
@@ -113,53 +111,53 @@
<application>${project.artifactId}</application>
<swf>${project.artifactId}</swf>
<width>100%</width>
- <height>100%</height>
+ <height>100%</height>-->
</properties>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <version>3.1.0</version>
- <executions>
- <execution>
- <id>copy-template-swf</id>
- <phase>compile</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${basedir}/target/swf</outputDirectory>
- <includeEmptyDirs>true</includeEmptyDirs>
- <resources>
- <resource>
- <directory>${ROYALE_HOME}/templates/swfobject</directory>
- <filtering>true</filtering>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>com.coderplus.maven.plugins</groupId>
- <artifactId>copy-rename-maven-plugin</artifactId>
- <version>1.0.1</version>
- <executions>
- <execution>
- <id>rename-file</id>
- <phase>compile</phase>
- <goals>
- <goal>rename</goal>
- </goals>
- <configuration>
- <sourceFile>${basedir}/target/swf/index.template.html</sourceFile>
- <destinationFile>${basedir}/target/swf/${project.artifactId}.html</destinationFile>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>-->
+ <!-- <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>3.1.0</version>
+ <executions>
+ <execution>
+ <id>copy-template-swf</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${basedir}/target/swf</outputDirectory>
+ <includeEmptyDirs>true</includeEmptyDirs>
+ <resources>
+ <resource>
+ <directory>${basedir}/../../../templates/swfobject</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>com.coderplus.maven.plugins</groupId>
+ <artifactId>copy-rename-maven-plugin</artifactId>
+ <version>1.0.1</version>
+ <executions>
+ <execution>
+ <id>rename-file</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>rename</goal>
+ </goals>
+ <configuration>
+ <sourceFile>${basedir}/target/swf/index.template.html</sourceFile>
+ <destinationFile>${basedir}/target/swf/${project.artifactId}.html</destinationFile>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>-->
</profile>
</profiles>
<dependencies>
@@ -177,7 +175,7 @@
<type>swc</type>
<classifier>js</classifier>
</dependency>
- <dependency>
+ <!--<dependency>
<groupId>org.apache.royale.framework</groupId>
<artifactId>HTML</artifactId>
<version>0.9.6-SNAPSHOT</version>
@@ -190,7 +188,7 @@
<version>0.9.6-SNAPSHOT</version>
<type>swc</type>
<classifier>js</classifier>
- </dependency>
+ </dependency>-->
<dependency>
<groupId>org.apache.royale.framework</groupId>
<artifactId>BasicTheme</artifactId>
diff --git a/examples/crux/GitHubCommitLogViewer/src/main/config/compile-app-config.xml b/examples/crux/GitHubCommitLogViewer/src/main/config/compile-app-config.xml
index 6ddf8a9..32bf453 100644
--- a/examples/crux/GitHubCommitLogViewer/src/main/config/compile-app-config.xml
+++ b/examples/crux/GitHubCommitLogViewer/src/main/config/compile-app-config.xml
@@ -17,29 +17,22 @@
-->
<royale-config>
- <compiler>
- <!-- build both SWF and JS. -->
+ <js-default-initializers>true</js-default-initializers>
+
+ <compiler>
<targets>
- <!--<target>SWF</target>-->
<target>JSRoyale</target>
+ <!-- no point building the swf target yet, there is a bug in mx ObjectUtil somewhere -->
+ <!--<target>SWF</target>-->
</targets>
-
- <library-path>
- <path-element>../../../../../../frameworks/libs/MXRoyale.swc</path-element>
- <path-element>../../../../../../frameworks/libs/Crux.swc</path-element>
- </library-path>
-
-
-
<keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- <name>SWFOverride</name>
-
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ <name>SWFOverride</name>
<name>Inject</name>
<name>Dispatcher</name>
@@ -49,11 +42,22 @@
<name>ViewAdded</name>
<name>ViewRemoved</name>
</keep-as3-metadata>
-
-
+ <keep-code-with-metadata>
+ <name>Inject</name>
+ </keep-code-with-metadata>
+
+ <js-library-path append="true">
+ <path-element>../../../../../../frameworks/js/libs/BasicJS.swc</path-element>
+ <path-element>../../../../../../frameworks/js/libs/CruxJS.swc</path-element>
+ <path-element>../../../../../../frameworks/js/libs/MXRoyaleJS.swc</path-element>
+ </js-library-path>
+ <library-path append="true">
+ <path-element>../../../../../../frameworks/libs/Basic.swc</path-element>
+ <path-element>../../../../../../frameworks/libs/Crux.swc</path-element>
+ <path-element>../../../../../../frameworks/libs/MXRoyale.swc</path-element>
+ </library-path>
+ <exclude-defaults-css-files>
+ <filename>MXRoyaleJS.swc:defaults.css</filename>
+ </exclude-defaults-css-files>
</compiler>
-
-
-
-
</royale-config>