-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
76 lines (66 loc) · 2.76 KB
/
build.xml
File metadata and controls
76 lines (66 loc) · 2.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<project xmlns:sf="antlib:com.salesforce" basedir="." xmlns:git="antlib:com.rimerosolutions.ant.git" default="deploy">
<property name="sf.server" value="https://login.salesforce.com"/>
<import file="${basedir}/lib/exec_anon.xml"/>
<import file="${basedir}/lib/undeploy.xml"/>
<!-- Downloaded from Salesforce Tools page under Setup -->
<typedef
uri="antlib:com.salesforce"
resource="com/salesforce/antlib.xml"
classpath="${basedir}/lib/ant-salesforce.jar"/>
<!-- See https://github.com/rimerosolutions/ant-git-tasks -->
<taskdef uri="antlib:com.rimerosolutions.ant.git"
resource="com/rimerosolutions/ant/git/jgit-ant-lib.xml">
<classpath>
<pathelement location="${basedir}/lib/org.eclipse.jgit.ant-3.0.0.201306101825-r.jar"/>
<pathelement location="${basedir}/lib/org.eclipse.jgit-3.0.0.201306101825-r.jar"/>
<pathelement location="${basedir}/lib/jsch-0.1.50.jar"/>
<pathelement location="${basedir}/lib/ant-git-tasks-0.0.1.jar"/>
</classpath>
</taskdef>
<!-- Deploy -->
<target name="deploy" depends="undeploy">
<!-- Download and deploy ApexMocks -->
<delete dir="${basedir}/lib/apexmocks"/>
<echo message="Cloning fflib-apex-mocks..."/>
<git:git directory="${basedir}/lib/apexmocks" verbose="false">
<git:clone uri="https://github.com/financialforcedev/fflib-apex-mocks.git"/>
</git:git>
<sf:deploy
username="${sf.username}"
password="${sf.password}"
serverurl="${sf.server}"
testLevel="RunLocalTests"
deployRoot="${basedir}/lib/apexmocks/src"/>
<!-- Download and deploy ApexCommons -->
<delete dir="${basedir}/lib/apexcommon"/>
<echo message="Cloning fflib-apex-common..."/>
<git:git directory="${basedir}/lib/apexcommon" verbose="false">
<git:clone uri="https://github.com/financialforcedev/fflib-apex-common.git"/>
</git:git>
<sf:deploy
username="${sf.username}"
password="${sf.password}"
serverurl="${sf.server}"
testLevel="RunLocalTests"
deployRoot="${basedir}/lib/apexcommon/fflib/src"/>
<!-- Deploy Apex Commons Sample -->
<sf:deploy
username="${sf.username}"
password="${sf.password}"
serverurl="${sf.server}"
testLevel="RunLocalTests"
deployRoot="${basedir}/fflib-sample-code/src"/>
</target>
<!-- Generate Mocks -->
<target name="generate.mocks">
<java classname="com.financialforce.apexmocks.ApexMockGenerator">
<classpath>
<pathelement location="${basedir}/bin/apex-mocks-generator-3.1.2.jar"/>
</classpath>
<arg value="${basedir}/fflib-sample-code/src/classes"/>
<arg value="${basedir}/interfacemocks.properties"/>
<arg value="Mocks"/>
<arg value="${basedir}/fflib-sample-code/src/classes"/>
</java>
</target>
</project>