-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
39 lines (33 loc) · 1.69 KB
/
build.xml
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
<project name="jzarinpal" basedir="." default="validate">
<property name="jzarinpaldir" value="${basedir}"/>
<property file="${jzarinpaldir}/build.properties" />
<property name="BuildPropsDotJava" value="${jzarinpaldir}/jzarinpal-domain/src/main/java/mars/jzarinpal/domain/build/BuildProps.java"/>
<target name="validate" depends="checkProp, copyConfig"/>
<target name="checkProp" depends="checkBuildDotPropertiesExists"
unless="${buildDotPropertiesExists}">
<echo>Copying build.properties-template to build.properties</echo>
<copy file="${jzarinpaldir}/build.properties-template"
tofile="${jzarinpaldir}/build.properties" verbose="yes"/>
</target>
<target name="copyConfig" depends="checkProp">
<!-- Copy BuildProps.java-->
<copy file="${BuildPropsDotJava}-template"
tofile="${BuildPropsDotJava}" overwrite="true" />
<replace file="${BuildPropsDotJava}"
token="@EDIT-WARNING-NOTE@" value="Do not edit this file directly!, modify BuildProps.java-template instead."/>
<replace file="${BuildPropsDotJava}"
token="@MERCHANT-ID@" value="${merchantID}"/>
<replace file="${BuildPropsDotJava}"
token="@IS-PROD-SERVER@" value="${isProdServer}"/>
<replace file="${BuildPropsDotJava}"
token="@SERVICE-BASE-URI@" value="${serviceBaseUri}"/>
<replace file="${BuildPropsDotJava}"
token="@DEFAULT-CALLBACK-URI@" value="${defaultCallbackUri}"/>
<replace file="${BuildPropsDotJava}"
token="@ZARINPAL-START-PAY-URI@" value="${zarinpalStartPayUri}"/>
</target>
<target name="checkBuildDotPropertiesExists">
<available property="buildDotPropertiesExists"
file="${jzarinpaldir}/build.properties"/>
</target>
</project>