Improve build.xml to prevent copying the one from the Android SDK.
This commit is contained in:
parent
5c68a7e513
commit
a341747195
5 changed files with 143 additions and 1533 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -3,7 +3,6 @@ obj
|
|||
gen
|
||||
bin
|
||||
doc
|
||||
ant.properties
|
||||
local.properties
|
||||
tests/*$py.class
|
||||
tests/build.xml
|
||||
|
|
5
Makefile
5
Makefile
|
@ -5,8 +5,6 @@ NUMCPUS=$(shell grep -c '^processor' /proc/cpuinfo || echo "4" )
|
|||
TOPDIR=$(shell pwd)
|
||||
PATCH_FFMPEG=$(shell cd submodules/externals/ffmpeg && git status | grep neon)
|
||||
LINPHONE_VERSION=$(shell grep -e '^.C_INIT' submodules/linphone/configure.ac | sed -e 's/.*linphone]\,\[//' |sed -e 's/\].*//' )
|
||||
KEYSTORE=bc-android.keystore
|
||||
KEYALIAS=nw8000
|
||||
|
||||
all: prepare-sources generate-libs generate-apk install-apk run-linphone
|
||||
|
||||
|
@ -54,11 +52,10 @@ generate-libs:
|
|||
|
||||
update-project:
|
||||
$(SDK_PATH)/android update project --path .
|
||||
echo "key.store=$(KEYSTORE)" > ant.properties
|
||||
echo "key.alias=$(KEYALIAS)" >> ant.properties
|
||||
touch default.properties
|
||||
|
||||
generate-apk:
|
||||
ant clean
|
||||
ant debug
|
||||
|
||||
install-apk: generate-apk
|
||||
|
|
3
ant.properties
Normal file
3
ant.properties
Normal file
|
@ -0,0 +1,3 @@
|
|||
source.dir=src:submodules/linphone/mediastreamer2/java/src:submodules/linphone/java/j2se:submodules/linphone/java/common:submodules/linphone/java/impl:submodules/linphone/coreapi/help/java
|
||||
key.store=bc-android.keystore
|
||||
key.alias=nw8000
|
58
custom_rules.xml
Normal file
58
custom_rules.xml
Normal file
|
@ -0,0 +1,58 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="custom_rules">
|
||||
<property name="linphone.package.name" value="org.linphone" />
|
||||
|
||||
<target name="-pre-build" description="Move file that is not to be compiled.">
|
||||
<move file="submodules/linphone/mediastreamer2/java/src/org/linphone/mediastream/MediastreamerActivity.java"
|
||||
tofile="submodules/linphone/mediastreamer2/java/src/org/linphone/mediastream/MediastreamerActivity.java.build"
|
||||
failonerror="false" />
|
||||
</target>
|
||||
|
||||
<target name="-post-build" description="Restore file that has been moved so that it was not compiled.">
|
||||
<move file="submodules/linphone/mediastreamer2/java/src/org/linphone/mediastream/MediastreamerActivity.java.build"
|
||||
tofile="submodules/linphone/mediastreamer2/java/src/org/linphone/mediastream/MediastreamerActivity.java"
|
||||
failonerror="false" />
|
||||
</target>
|
||||
|
||||
<target name="-package-resources" depends="-crunch">
|
||||
<!-- only package resources if *not* a library project -->
|
||||
<do-only-if-not-library elseText="Library project: do not package resources..." >
|
||||
<exec executable="${aapt}" failonerror="true">
|
||||
<arg value="package" />
|
||||
<arg value="-f" />
|
||||
<arg value="-v" />
|
||||
<arg value="--version-code" />
|
||||
<arg value="${version.code}" />
|
||||
<arg value="--debug-mode" />
|
||||
<arg value="-m" />
|
||||
<arg value="-u" />
|
||||
<arg value="-J" />
|
||||
<arg path="${gen.absolute.dir}" />
|
||||
<arg value="-M" />
|
||||
<arg path="${out.manifest.abs.file}" />
|
||||
<arg value="-I" />
|
||||
<arg path="${project.target.android.jar}" />
|
||||
<arg value="-F" />
|
||||
<arg path="${out.absolute.dir}/${resource.package.file.name}" />
|
||||
<arg value="-S" />
|
||||
<arg path="${resource.absolute.dir}" />
|
||||
<arg value="--rename-manifest-package"/>
|
||||
<arg value="${linphone.package.name}"/>
|
||||
<arg value="--custom-package" />
|
||||
<arg value="${linphone.package.name}"/>
|
||||
</exec>
|
||||
</do-only-if-not-library>
|
||||
</target>
|
||||
|
||||
<target name="run">
|
||||
<exec executable="adb">
|
||||
<arg value="shell"/>
|
||||
<arg value="am"/>
|
||||
<arg value="start"/>
|
||||
<arg value="-a"/>
|
||||
<arg value="android.intent.action.MAIN"/>
|
||||
<arg value="-n"/>
|
||||
<arg value="${linphone.package.name}/org.linphone.LinphoneLauncherActivity"/>
|
||||
</exec>
|
||||
</target>
|
||||
</project>
|
Loading…
Reference in a new issue