Skip to content

Commit 29282d9

Browse files
author
graeme
committed
fix for GRAILS-2638
git-svn-id: https://svn.codehaus.org/grails/trunk@6807 1cfb16fd-6d17-0410-8ff1-b7e8e1e2867d
1 parent 8dee8f1 commit 29282d9

File tree

2 files changed

+102
-0
lines changed

2 files changed

+102
-0
lines changed

ant/build/osx.xml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<project name="grails-osx">
2+
3+
4+
<property name="build.command" value=";ant/bin/ant clean build"/>
5+
<property name="test.command" value=";ant/bin/ant clean build test"/>
6+
<property name="export.prefix" value="export JAVA_HOME="/>
7+
8+
<property name="jdk14.location" value="/System/Library/Frameworks/JavaVM.framework/Versions/1.4/Home"/>
9+
<property name="jdk15.location" value="/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home"/>
10+
<property name="jdk16.location" value="/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home"/>
11+
12+
<property name="jdk14.build" value="${export.prefix}${jdk14.location}${build.command}"/>
13+
<property name="jdk15.build" value="${export.prefix}${jdk15.location}${build.command}"/>
14+
<property name="jdk16.build" value="${export.prefix}${jdk16.location}${build.command}"/>
15+
16+
<property name="jdk14.test" value="${jdk14.build} test"/>
17+
<property name="jdk15.test" value="${jdk15.build} test"/>
18+
<property name="jdk16.test" value="${jdk16.build} test"/>
19+
20+
<available file="${jdk14.location}" property="jdk14.present"/>
21+
<available file="${jdk15.location}" property="jdk15.present"/>
22+
<available file="${jdk16.location}" property="jdk16.present"/>
23+
24+
<target name="test-os">
25+
<condition property="isOSX" else="isNotOSX">
26+
<and>
27+
<os family="mac"/>
28+
<and>
29+
<os family="unix"/>
30+
</and>
31+
</and>
32+
</condition>
33+
<fail message="You are not running OS X" if="isNotOSX"/>
34+
<echo>You are running ${os.name} ${os.arch} ${os.version}</echo>
35+
</target>
36+
37+
<target name="build-with-jdk">
38+
<exec executable="bash" failonerror="true">
39+
<arg value="-norc"/>
40+
<arg value="-c"/>
41+
<arg value="${export.prefix}${jdk.location}${build.command}"/>
42+
</exec>
43+
</target>
44+
45+
<target name="test-with-jdk">
46+
<exec executable="bash" failonerror="true">
47+
<arg value="-norc"/>
48+
<arg value="-c"/>
49+
<arg value="${export.prefix}${jdk.location}${build.command} test"/>
50+
</exec>
51+
</target>
52+
53+
<target name="osx-build-with-14" if="jdk14.present">
54+
<antcall target="build-with-jdk">
55+
<param name="jdk.location" value="${jdk14.location}"/>
56+
</antcall>
57+
</target>
58+
59+
<target name="osx-build-with-15" if="jdk15.present">
60+
<antcall target="build-with-jdk">
61+
<param name="jdk.location" value="${jdk15.location}"/>
62+
</antcall>
63+
</target>
64+
65+
<target name="osx-build-with-16" if="jdk16.present">
66+
<antcall target="build-with-jdk">
67+
<param name="jdk.location" value="${jdk16.location}"/>
68+
</antcall>
69+
</target>
70+
71+
<target name="osx-test-with-14" if="jdk14.present">
72+
<antcall target="test-with-jdk">
73+
<param name="jdk.location" value="${jdk14.location}"/>
74+
</antcall>
75+
</target>
76+
77+
<target name="osx-test-with-15" if="jdk15.present">
78+
<antcall target="test-with-jdk">
79+
<param name="jdk.location" value="${jdk15.location}"/>
80+
</antcall>
81+
</target>
82+
83+
<target name="osx-test-with-16" if="jdk16.present">
84+
<antcall target="test-with-jdk">
85+
<param name="jdk.location" value="${jdk16.location}"/>
86+
</antcall>
87+
</target>
88+
89+
<target name="osx-multi-build" depends="test-os">
90+
<antcall target="osx-build-with-14"/>
91+
<antcall target="osx-build-with-15"/>
92+
<antcall target="osx-build-with-16"/>
93+
</target>
94+
95+
<target name="osx-multi-test" depends="test-os">
96+
<antcall target="osx-test-with-14"/>
97+
<antcall target="osx-test-with-15"/>
98+
<antcall target="osx-test-with-16"/>
99+
</target>
100+
101+
</project>

build.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<import file="ant/build/unit-test.xml" />
3333
<import file="ant/build/bundle.xml" />
3434
<import file="ant/build/javadoc.xml" />
35+
<import file="ant/build/osx.xml" />
3536
<!--<import file="ant/build/checkstyle.xml" />-->
3637
<import file="ant/build/release.xml" />
3738
<import file="ant/build/eclipse.xml" />

0 commit comments

Comments
 (0)