-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
39 lines (27 loc) · 1.24 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
<?xml version="1.0"?>
<project name="blogmark" default="createextension">
<taskdef name="jscomp" classname="com.google.javascript.jscomp.ant.CompileTask" classpath="../build/compiler.jar" />
<!-- put your version here -->
<property name="VERSION" value="0.0.1" />
<target name="createextension" depends="closure" description="Assemble the final build extension.zip">
<zip destfile="extension_v${VERSION}.zip">
<zipfileset dir="." includes="extension/**" excludes="extension/manifest.tpl.json,extension/js/chromeExtensionsCode.js,extension/.settings/*,extension/.project" />
</zip>
</target>
<target name="templates" description="Generate files from templates.">
<copy file="extension/manifest.tpl.json" tofile="extension/manifest.json" overwrite="true">
<filterchain>
<replacetokens>
<token key="VERSION" value="${VERSION}" />
</replacetokens>
</filterchain>
</copy>
</target>
<target name="closure" depends="templates" description="Minify javascripts with closure">
<jscomp compilationLevel="simple" warning="default" debug="false" output="extension/js/chromeExtensionsCode.min.js">
<sources dir="${basedir}/extension/js">
<file name="chromeExtensionsCode.js" />
</sources>
</jscomp>
</target>
</project>