5
5
htmlunit-core-js is a Rhino fork containing patches that haven't (yet) been
6
6
applied in Rhino but that are needed for HtmlUnit.
7
7
8
- The build file tries to ensure that no patch is kept when it is not needed anymore.
9
-
10
8
CAUTION: before to release, the rhinoDiff.txt needs to be generated to respect
11
9
the terms of the MPL.
12
10
11
+ "eclipse.bin" should be defined in 'build.properties', and is used to beautify the source code.
12
+
13
13
Marc Guillemot
14
14
Ahmed Ashour
15
15
====================================================================== -->
@@ -19,6 +19,7 @@ Ahmed Ashour
19
19
20
20
<property name =" target-jvm" value =" 1.5" />
21
21
<property name =" source-level" value =" 1.5" />
22
+ <property file =" build.properties" />
22
23
<property name =" rhino.basedir" location =" ../htmlunit-rhino-fork" />
23
24
<property name =" classes" value =" ${ rhino.basedir } /build/classes" />
24
25
<property name =" repackaged-rhino.dir" value =" target/repackaged-rhino" />
@@ -61,6 +62,8 @@ Ahmed Ashour
61
62
<replace dir =" ${ corejs.dir } " token =" org.mozilla" value =" net.sourceforge.htmlunit.corejs" />
62
63
<replace dir =" ${ corejs.dir } " token =" org/mozilla" value =" net/sourceforge/htmlunit/corejs" />
63
64
65
+ <antcall target =" beautify" />
66
+
64
67
<mkdir dir =' ${ repackaged-rhino.dir } /classes' />
65
68
<javac destdir =' ${ repackaged-rhino.dir } /classes' debug =' true' encoding =" ISO-8859-1" source =' 1.5' target =' 1.5' includeAntRuntime =' false' >
66
69
<src path =' ${ repackaged-rhino.dir } /src' />
@@ -72,6 +75,24 @@ Ahmed Ashour
72
75
</copy >
73
76
</target >
74
77
78
+ <target name =" beautify" depends =" beautify-check" if =" eclipse.bin" >
79
+ <exec executable =" ${ eclipse.bin } " failonerror =" true" >
80
+ <arg value =" -nosplash" />
81
+ <arg value =" -application" />
82
+ <arg value =" org.eclipse.jdt.core.JavaCodeFormatter" />
83
+ <arg value =" -verbose" />
84
+ <arg value =" -config" />
85
+ <arg value =" eclipse.formatter.prefs" />
86
+ <arg value =" ${ repackaged-rhino.dir } /src/" />
87
+ </exec >
88
+ </target >
89
+
90
+ <target name =" beautify-check" unless =" eclipse.bin" >
91
+ <echo message =" *******************************************************************" />
92
+ <echo message =" "eclipse.bin" is not defined, skipping beautifying the source code." />
93
+ <echo message =" *******************************************************************" />
94
+ </target >
95
+
75
96
<target name =" jar-with-source" depends =" repackage, generate-rhino-diff" >
76
97
<basename property =" rhino.diff.filename" file =" ${ rhino.diff } " />
77
98
<dirname property =" rhino.diff.dirname" file =" ${ rhino.diff } " />
0 commit comments