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

commit c21a61b0c17b53962736c9cc3f4b7a15119c0bc0
Author: Josh Tynjala <joshtynj...@apache.org>
AuthorDate: Wed May 18 10:35:24 2022 -0700

    formatter: separate jar part of main target into its own target
    
    Makes it easy to skip tests, if desired
---
 formatter/build.xml | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/formatter/build.xml b/formatter/build.xml
index 93e6bc894..5783242af 100644
--- a/formatter/build.xml
+++ b/formatter/build.xml
@@ -85,11 +85,11 @@
     </target>
     
     <target name="prebuild">
-        <mkdir dir="${formatter}/target/classes" />
-        <mkdir dir="${formatter}/target/classes/META-INF" />
+        <mkdir dir="${formatter}/target/classes"/>
+        <mkdir dir="${formatter}/target/classes/META-INF"/>
     </target>
-    
-    <target name="main" depends="prebuild,compile" >
+
+    <target name="jar" depends="prebuild,compile">
         <mkdir dir="${sdk}"/>
         <copy file="${basedir}/../LICENSE.base" 
tofile="${formatter}/target/classes/META-INF/LICENSE"/>
         <copy file="${basedir}/../NOTICE.base" 
tofile="${formatter}/target/classes/META-INF/NOTICE"/>
@@ -101,19 +101,22 @@
                 <attribute name="Implementation-Title" 
value="${manifest.Implementation-Title}"/>
                 <attribute name="Implementation-Version" 
value="${manifest.Implementation-Version}.${build.number}"/>
                 <attribute name="Implementation-Vendor" 
value="${manifest.Implementation-Vendor}"/>
-                <attribute name="Main-Class" 
value="org.apache.royale.formatter.FORMATTER" />
+                <attribute name="Main-Class" 
value="org.apache.royale.formatter.FORMATTER"/>
                 <attribute name="Class-Path" value="compiler.jar"/>
             </manifest>
         </jar>
-        <antcall target="test" />
-        <antcall target="jar-test" />
+    </target>
+    
+    <target name="main" depends="jar">
+        <antcall target="test"/>
+        <antcall target="jar-test"/>
     </target>
 
-    <target name="test" >
-        <ant dir="src/test" />
+    <target name="test">
+        <ant dir="src/test"/>
     </target>
     
-    <target name="jar-test" >
+    <target name="jar-test">
         <echo>using formatter.jar from ${sdk}</echo>
         <java jar="${sdk}/formatter.jar" fork="true" 
resultproperty="formatter.result"/>
         <fail message="Starting Failed">

Reply via email to