Skip to content

Commit ffca7a3

Browse files
author
Devendra
committed
adding debug build generation
2 parents 79f571a + 81b0a16 commit ffca7a3

42 files changed

Lines changed: 203 additions & 166 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎android/Pubnub-Android-3.5.4.jar‎

28 Bytes
Binary file not shown.
55 KB
Binary file not shown.

‎android/build.xml‎

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<project basedir="." default="build" name="PubnubApi">
2+
<project basedir="." default="build-all" name="PubnubApi">
33
<property environment="env"/>
44
<loadfile property="VERSION" srcFile="../VERSION"><filterchain><striplinebreaks/></filterchain></loadfile>
55
<property name="pubnub_lib_jar" value="Pubnub-Android-${VERSION}.jar"/>
6+
<property name="pubnub_debug_lib_jar" value="Pubnub-Android-Debug-${VERSION}.jar"/>
67
<property name="java_core_path" value="../java"/>
78
<property name="src_pubnub_api_path" value="${java_core_path}/srcPubnubApi"/>
89
<property name="src_java_path" value="${java_core_path}/src1"/>
@@ -17,6 +18,7 @@
1718
<pathelement location="libs/android-8.jar"/>
1819
</path>
1920
<target name="test" />
21+
<target name="build-all" depends="debug-build, clean, build" />
2022
<target name="setDebugTrue" >
2123
<replace dir="${src_pubnub_api_path}" token="boolean LOGGING = false" value="boolean LOGGING = true">
2224
<include name="**/*.java"/>
@@ -27,7 +29,6 @@
2729
<include name="**/*.java"/>
2830
</replace>
2931
</target>
30-
<target depends="setDebugTrue,build,unsetDebugTrue" name="debug-build"/>
3132
<target name="init">
3233
<mkdir dir="bin"/>
3334
<copy includeemptydirs="false" todir="bin">
@@ -39,35 +40,52 @@
3940
</target>
4041
<target name="clean">
4142
<delete dir="bin"/>
42-
<delete file="${pubnub_lib_jar}"/>
4343
</target>
4444
<target depends="clean" name="cleanall"/>
45-
<target depends="copy_jars_to_examples" name="build"/>
45+
<target depends="copy_jars_to_examples" name="build-jar"/>
4646
<target depends="create-jar" name="copy_jars_to_examples">
4747
<copy file="${pubnub_lib_jar}" todir="./examples/PubnubExample/libs/"/>
4848
<copy file="${pubnub_lib_jar}" todir="./examples/SubscribeAtBoot/libs/"/>
4949
</target>
5050

51+
52+
<target name="build" depends="clean">
53+
<delete file="${pubnub_lib_jar}"/>
54+
<antcall target="build-jar">
55+
<param name="jar_name" value="${pubnub_lib_jar}" />
56+
<param name="debug" value="false" />
57+
</antcall>
58+
</target>
59+
<target name="debug-build" depends="clean">
60+
<delete file="${pubnub_debug_lib_jar}"/>
61+
<antcall target="setDebugTrue" />
62+
<antcall target="build-jar">
63+
<param name="jar_name" value="${pubnub_debug_lib_jar}" />
64+
<param name="debug" value="true" />
65+
</antcall>
66+
<antcall target="unsetDebugTrue" />
67+
</target>
68+
5169
<target depends="build-project" name="create-jar">
52-
<jar destfile="${pubnub_lib_jar}"
70+
<jar destfile="${jar_name}"
5371
basedir="bin"
5472
includes="**/**"
5573
/>
5674
</target>
5775

5876
<target depends="init" name="build-project">
5977
<echo message="${ant.project.name}: ${ant.file}"/>
60-
<replace dir="${src_pubnub_api_path}" token='protected static String VERSION = ""' value='protected static String VERSION = "${VERSION}"' >
78+
<replace dir="${src_pubnub_api_path}" token='static String VERSION = ""' value='static String VERSION = "${VERSION}"' >
6179
<include name="**/*.java"/>
6280
</replace>
63-
<javac destdir="bin" source="${source}" target="${target}">
81+
<javac debug="${debug}" destdir="bin" source="${source}" target="${target}">
6482
<src path="${src_pubnub_api_path}"/>
6583
<src path="${src_java_path}"/>
6684
<src path="${src_logging_path}"/>
6785
<src path="${src_android_path}"/>
6886
<classpath refid="classpath"/>
6987
</javac>
70-
<replace dir="${src_pubnub_api_path}" token='protected static String VERSION = "${VERSION}"' value='protected static String VERSION = ""'>
88+
<replace dir="${src_pubnub_api_path}" token='static String VERSION = "${VERSION}"' value='static String VERSION = ""'>
7189
<include name="**/*.java"/>
7290
</replace>
7391
</target>
28 Bytes
Binary file not shown.
28 Bytes
Binary file not shown.
6 Bytes
Binary file not shown.
61 KB
Binary file not shown.

‎blackberry/build.xml‎

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<project basedir="." default="build" name="PubnubApi">
2+
<project basedir="." default="build-all" name="PubnubApi">
33
<property environment="env"/>
44
<loadfile property="VERSION" srcFile="../VERSION"><filterchain><striplinebreaks/></filterchain></loadfile>
55
<property name="pubnub_lib_jar" value="Pubnub-BlackBerry-${VERSION}.jar"/>
6+
<property name="pubnub_debug_lib_jar" value="Pubnub-BlackBerry-Debug-${VERSION}.jar"/>
67
<property name="srcPubnubApi.link" value="../java/srcPubnubApi"/>
78
<property name="j2me.link" value="../j2me"/>
89
<property name="target" value="1.1"/>
@@ -17,6 +18,7 @@
1718
<pathelement location="${j2me.link}/libs/tinylinegzip.jar"/>
1819
</path>
1920
<target name="test" />
21+
<target name="build-all" depends="debug-build, build" />
2022
<target name="setJsonMeJar" >
2123
<replace dir="${srcPubnubApi.link}" token="org.json" value="org.json.me">
2224
<include name="**/*.java"/>
@@ -50,35 +52,48 @@
5052
<include name="**/*.java"/>
5153
</replace>
5254
</target>
53-
<target depends="setDebugTrue,build,unsetDebugTrue" name="debug-build"/>
54-
<target depends="create-jar, clean" name="build"/>
55+
<target name="build" depends="clean" >
56+
<antcall target="build-jar">
57+
<param name="jar_name" value="${pubnub_lib_jar}" />
58+
<param name="debug" value="false" />
59+
</antcall>
60+
</target>
61+
<target name="debug-build" depends="clean" >
62+
<antcall target="setDebugTrue" />
63+
<antcall target="build-jar">
64+
<param name="jar_name" value="${pubnub_debug_lib_jar}" />
65+
<param name="debug" value="true" />
66+
</antcall>
67+
<antcall target="unsetDebugTrue" />
68+
</target>
69+
<target depends="create-jar, clean" name="build-jar"/>
5570
<target depends="build-project" name="create-jar">
56-
<jar destfile="${pubnub_lib_jar}"
71+
<jar destfile="${jar_name}"
5772
basedir="bin"
5873
includes="**/**"
5974
/>
6075
<exec failonerror="true" executable="tools/preverify">
6176
<arg line="-classpath libs/net_rim_api.jar:libs/bouncycastle.jar:../j2me/libs/tinylinegzip.jar"/>
6277
<arg line="-d output"/>
63-
<arg line="${pubnub_lib_jar}"/>
78+
<arg line="${jar_name}"/>
6479
</exec>
65-
<move verbose="true" file="output/${pubnub_lib_jar}" tofile="${pubnub_lib_jar}"/>
80+
<move verbose="true" file="output/${jar_name}" tofile="${jar_name}"/>
6681
<delete dir="output"/>
6782
</target>
6883

6984
<target depends="init" name="build-project">
7085
<echo message="${ant.project.name}: ${ant.file}"/>
71-
<replace dir="${srcPubnubApi.link}" token='protected static String VERSION = ""' value='protected static String VERSION = "${VERSION}"' >
86+
<replace dir="${srcPubnubApi.link}" token='static String VERSION = ""' value='static String VERSION = "${VERSION}"' >
7287
<include name="**/*.java"/>
7388
</replace>
74-
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}">
89+
<javac debug="${debug}" destdir="bin" source="${source}" target="${target}">
7590
<src path="${srcPubnubApi.link}"/>
7691
<src path="src"/>
7792
<src path="${j2me.link}/src1"/>
7893
<src path="${j2me.link}/srcLogging"/>
7994
<classpath refid="PubnubApi.classpath"/>
8095
</javac>
81-
<replace dir="${srcPubnubApi.link}" token='protected static String VERSION = "${VERSION}"' value='protected static String VERSION = ""'>
96+
<replace dir="${srcPubnubApi.link}" token='static String VERSION = "${VERSION}"' value='static String VERSION = ""'>
8297
<include name="**/*.java"/>
8398
</replace>
8499
</target>

‎build.xml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<project basedir="." default="build">
2+
<project basedir="." default="build-all">
3+
<target name="build-all">
4+
<subant target="build-all" >
5+
<fileset dir="." includes="*/build.xml" />
6+
</subant>
7+
</target>
38
<target name="build">
49
<subant target="build" >
510
<fileset dir="." includes="*/build.xml" />
44 KB
Binary file not shown.

0 commit comments

Comments
 (0)