-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild-core.xml
81 lines (70 loc) · 2.96 KB
/
build-core.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
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
77
78
79
80
81
<?xml version="1.0" encoding="UTF-8"?>
<project default="release">
<propertyfile file="build.properties">
<entry key="app.build.number" default="0" type="int" operation="+" value="1" />
</propertyfile>
<property file="build.properties" />
<property name="path_libs" value="builds/apm-core" />
<property name="app.build.jar.path" value="${path_libs}/${app.build.jar.core}.jar" />
<property name="app.build.currentversion.path" value="${path_libs}/versions/${app.build.jar.core}-${app.build.verision}.${app.build.number}.jar" />
<property name="app.build" value="bin" />
<property name="app.build.bin" value="${app.build}/bin" />
<property name="app.build.src" value="${app.build}/src-core" />
<property name="app.libs" value="" />
<property name="app.src" value="src-core" />
<target name="release" depends="clean,compile,build-jar,clean_bin">
<echo>Finished</echo>
</target>
<target name="clean">
<delete dir="${app.build.bin}" />
<delete dir="${app.build.src}" />
</target>
<target name="clean_bin">
<delete dir="${app.build.bin}" />
<delete dir="${app.build.src}" />
</target>
<target name="create-dir">
<mkdir dir="${app.build}" />
<mkdir dir="${app.build.src}" />
<mkdir dir="${app.build.bin}" />
</target>
<target name="copy">
<copy todir="${app.build.src}" overwrite="true">
<fileset dir="${app.src}" includes="**/*" />
</copy>
</target>
<target name="precompile" depends="clean,create-dir,copy">
<replace dir="${app.build.src}" encoding="UTF-8">
<replacefilter token="%%VERSION_CORE%%" value="${app.build.verision}.${app.build.number}" />
</replace>
<echo>Finished</echo>
</target>
<target name="compile" depends="precompile">
<javac srcdir="${app.build.src}" destdir="${app.build.bin}" classpath="${app.libs}" includeantruntime="false" debug="off" encoding="UTF-8">
</javac>
<copy todir="${app.build.bin}">
<fileset dir="${app.build.src}" includes="**/*.*" excludes="**/*.java" />
</copy>
</target>
<target name="build-jar" depends="">
<delete file="${app.build.jar.path}" />
<jar destfile="${app.build.jar.path}">
<fileset dir="${app.build.bin}" includes="**/*.*" excludes="com/adbhelper/*.class" />
<manifest>
<attribute name="Manifest-Version" value="1.0" />
<attribute name="Class-Path" value="." />
<attribute name="Built-By" value="Vladimir Baraznovsky" />
<section name="common">
<!--
<attribute name="Specification-Title" value="Example"/>
<attribute name="Specification-Vendor" value="Example Organization"/>
<attribute name="Implementation-Title" value="common"/>
<attribute name="Implementation-Vendor" value="Example Corp."/>-->
<attribute name="Specification-Version" value="${app.build.verision}" />
<attribute name="Implementation-Version" value="${app.build.verision} Build ${app.build.number} ${TODAY}" />
</section>
</manifest>
</jar>
<copyfile dest="${app.build.currentversion.path}" src="${app.build.jar.path}" />
</target>
</project>