-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.xml
More file actions
167 lines (157 loc) · 6.99 KB
/
build.xml
File metadata and controls
167 lines (157 loc) · 6.99 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- WARNING: Eclipse auto-generated file.
Any modifications will be overwritten.
To include a user specific buildfile here, simply create one in the same
directory with the processing instruction <?eclipse.ant.import?>
as the first entry and export the buildfile again. -->
<project basedir="." default="compile" name="sedec" >
<property environment="env"/>
<property name="version" value="2.0"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.7"/>
<property name="source" value="1.7"/>
<property name="release.dir" value="release"/>
<property name="bin.dir" value="bin"/>
<property name="lib.dir" value="libs"/>
<property name="src.dir" value="src/main/java"/>
<property name="doc.dir" value="${release.dir}/document"/>
<property name="output.prefix" value="${release.dir}/library/"/>
<property name="output.jar" value="${output.prefix}/${ant.project.name}-${version}.jar"/>
<property name="source.prefix" value="${release.dir}/source/"/>
<property name="source.jar" value="${source.prefix}/${ant.project.name}-${version}.source.jar"/>
<path id="project.classpath">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<target name="initialize">
<mkdir dir="${bin.dir}"/>
<copy includeemptydirs="false" todir="${bin.dir}">
<fileset dir="${src.dir}">
<exclude name="**/*.launch"/>
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="distclean">
<delete dir="${bin.dir}"/>
<delete file="${output.jar}"/>
<delete file="${source.jar}"/>
</target>
<target depends="compile" name="versioning">
<tstamp>
<format property="builtat" pattern="MM/dd/yyyy hh:mm aa" />
</tstamp>
<exec executable="whoami" outputproperty="whoami"/>
<exec executable="uname" outputproperty="buildsystem"><arg value="-a"/></exec>
<propertyfile file="${basedir}/version.properties"
comment="This file is automatically generated - DO NOT EDIT">
<entry key="buildtime" value="${builtat}"/>
<entry key="builder" value="${whoami}"/>
<entry key="version" value="${version}"/>
<entry key="build.number" default="0000" operation="+" pattern="0000" type="int"/>
<entry key="system" value="${buildsystem}"/>
</propertyfile>
</target>
<target depends="initialize" name="compile">
<echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="${bin.dir}" includeantruntime="false" source="${source}" target="${target}">
<src path="${src.dir}"/>
<classpath refid="project.classpath"/>
</javac>
</target>
<target depends="initialize,compile" name="release-sdk">
<jar jarfile="${output.jar}"
basedir="${bin.dir}"
includes="**/*.class">
</jar>
<jar jarfile="${source.jar}"
basedir="${src.dir}">
</jar>
</target>
<!-- @note : http://blog.daum.net/_blog/BlogTypeView.do?blogid=05gBm&articleno=7019813 -->
<target depends="release-sdk" name="release-sdk-obfuscate">
<taskdef resource="proguard/ant/task.properties"
classpath="${lib.dir}/proguard-6.0.3.jar" />
<echo> ${java.home} </echo>
<proguard overloadaggressively="on"
defaultpackage="${ant.project.name}"
allowaccessmodification="on"
printseeds="on"
obfuscate="yes">
-libraryjars ${java.home}/lib/rt.jar
-injars ${output.jar}
-outjars ${output.jar}.min.jar
-dontnote
-dontwarn
-keep class ** {
public *;
}
-keep interface ** {
public *;
}
-keepattributes InnerClasses
</proguard>
</target>
<target depends="release-sdk-obfuscate" name="deploy">
<property name="id" value="root"/>
<property name="server_ip" value="10.0.12.157"/>
<property name="server_path" value="/var/www/html/thkang2"/>
<exec executable="rsync">
<arg value="-avz"/>
<arg value="${release.dir}"/>
<arg value="${id}@${server_ip}:${server_path}/${ant.project.name}"/>
</exec>
</target>
<target name="doc-internal" description="generate documentation">
<javadoc destdir="${doc.dir}/internal/"
classpathref="project.classpath"
version="true"
windowtitle="${ant.project.name} SDK Document"
doctitle="${ant.project.name} SDK which's able to extract everything from TLV"
linksource="yes"
encoding="utf-8"
charset="utf-8"
docencoding="utf-8"
access="private"
bottom="Copyright © 2018, Teho Kang and/or its affiliates.
All rights reserved. Use is subject to license terms.
Also see the documentation redistribution policy.">
<fileset dir="${src.dir}" defaultexcludes="no"/>
<doctitle>
<![CDATA[
${ant.project.name} (Internal) SDK which's able to extract everything from TLV
<img src="https://github.com/tehokang/documents/blob/master/sedec/sedec2-arib-packages.png?raw=true"/>
]]>
</doctitle>
<classpath>
<pathelement location="${bin.dir}"/>
</classpath>
</javadoc>
</target>
<target name="doc-external" description="generate documentation">
<javadoc destdir="${doc.dir}/external/"
classpathref="project.classpath"
version="true"
windowtitle="${ant.project.name} SDK Document"
linksource="no"
encoding="utf-8"
charset="utf-8"
docencoding="utf-8"
access="public"
bottom="Copyright © 2018, Teho Kang and/or its affiliates.
All rights reserved. Use is subject to license terms.
Also see the documentation redistribution policy.">
<fileset dir="${src.dir}" defaultexcludes="no"/>
<doctitle>
<![CDATA[
${ant.project.name} (External) SDK which's able to extract everything from TLV
<img src="https://github.com/tehokang/documents/blob/master/sedec/sedec2-arib-packages.png?raw=true"/>
]]>
</doctitle>
<classpath>
<pathelement location="${bin.dir}"/>
</classpath>
</javadoc>
</target>
</project>