|
4 | 4 |
|
5 | 5 | --[ Build requirements ]-------------------------------------
|
6 | 6 |
|
7 |
| -* JDK 1.5 |
8 |
| - Note: that this is a buildtime dependency for 1.5 specific |
9 |
| - features. However the final built jars should run on 1.4 |
10 |
| - and 1.3 JVMs with some features unavailable. |
11 |
| - |
12 |
| -* Ant 1.6 or greater |
13 |
| - To enable testing support, ensure junit.jar exists in |
14 |
| - ANT_HOME/lib. |
| 7 | +* JDK 1.7 |
15 | 8 |
|
| 9 | +* Gradle |
16 | 10 |
|
17 | 11 | --[ Building from the command line ]-------------------------
|
18 | 12 |
|
19 | 13 | Execute the default ant target:
|
20 |
| - ant |
| 14 | + ./gradlew clean build javadoc |
21 | 15 |
|
22 | 16 | This will do a full clean build, run all tests and (if
|
23 | 17 | successful) package up a distribution. The resulting builds
|
24 | 18 | reside in the 'build' directory.
|
25 | 19 |
|
26 |
| -For a list of finer grained build operations: |
27 |
| - ant -projecthelp |
28 |
| - |
29 |
| -The default version number used in the build is 'SNAPSHOT'. |
30 |
| -To override this, you can pass a property to ant: |
31 |
| - ant -Dversion=MY.OTHER.VERSION |
32 |
| - |
33 |
| - |
34 |
| ---[ Building from the IDE ]---------------------------------- |
35 |
| - |
36 |
| -It is possible to compile and test the source directly from |
37 |
| -popular IDEs, without resorting to the command line. |
38 |
| - |
39 |
| -Steps: |
40 |
| - - Run 'ant library'. This generates additional Java coded |
41 |
| - necessary to compile. |
42 |
| - - Create a new project. |
43 |
| - - Add the following directories as source directories: |
44 |
| - hamcrest-api/src/main/java |
45 |
| - hamcrest-generator/src/main/java |
46 |
| - hamcrest-core/src/main/java |
47 |
| - hamcrest-library/src/main/java |
48 |
| - hamcrest-integration/src/main/java |
49 |
| - build/temp/hamcrest-core/generated-code |
50 |
| - build/temp/hamcrest-library/generated-code |
51 |
| - hamcrest-examples/src/main/java |
52 |
| - - Add the following directories as test directories: |
53 |
| - hamcrest-api/src/test/java |
54 |
| - hamcrest-generator/src/test/java |
55 |
| - hamcrest-core/src/test/java |
56 |
| - hamcrest-library/src/test/java |
57 |
| - hamcrest-integration/src/test/java |
58 |
| - If this is unsupported by the IDE, add them as source |
59 |
| - directories. |
60 |
| - - Include all jars in the lib directory in the classpath. |
61 |
| - - Compile as usual in the IDE. |
62 |
| - - If supported, run all tests under org.hamcrest from the |
63 |
| - IDEs JUnit runner. |
64 |
| - |
0 commit comments