From 8aaf31d14f04b35c049bb14c31a57c3b6c8c5360 Mon Sep 17 00:00:00 2001 From: "leozwang@webrtc.org" Date: Thu, 10 May 2012 18:16:27 +0000 Subject: [PATCH] Create makefile for video engine Description: This build.xml will enable video engine build on android by ant. As we discussed before, in order to make video engine build based on current webrtc file structure which is not normal, I created this customized build.xml which is based on build.xml in android SDK. BUG= TEST= Review URL: https://webrtc-codereview.appspot.com/571008 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2219 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../main/test/android_test/.classpath | 9 - .../main/test/android_test/.project | 33 - .../main/test/android_test/build.xml | 1559 ++++++++++++++++- .../main/test/android_test/default.properties | 13 - 4 files changed, 1489 insertions(+), 125 deletions(-) delete mode 100644 src/video_engine/main/test/android_test/.classpath delete mode 100644 src/video_engine/main/test/android_test/.project delete mode 100644 src/video_engine/main/test/android_test/default.properties diff --git a/src/video_engine/main/test/android_test/.classpath b/src/video_engine/main/test/android_test/.classpath deleted file mode 100644 index f2adf55d2..000000000 --- a/src/video_engine/main/test/android_test/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/video_engine/main/test/android_test/.project b/src/video_engine/main/test/android_test/.project deleted file mode 100644 index 6765ec26c..000000000 --- a/src/video_engine/main/test/android_test/.project +++ /dev/null @@ -1,33 +0,0 @@ - - - ViEAndroidDemo - - - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - - diff --git a/src/video_engine/main/test/android_test/build.xml b/src/video_engine/main/test/android_test/build.xml index 476b98fcd..555cb05e6 100644 --- a/src/video_engine/main/test/android_test/build.xml +++ b/src/video_engine/main/test/android_test/build.xml @@ -1,85 +1,1504 @@ - - + - - - - - - - + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. - - + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @{elseText} + + + + + + + + + + + + + + + + + + + + + @{elseText} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Running tests ... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Uninstalling @{app.package} from the default emulator or device... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gathering info for ${ant.project.name}... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Building Libraries + + + + + + ############################################ + **** Back to project ${ant.project.name} **** + ############################################ + + + + + + + + + + + + Building tested project at ${tested.project.absolute.dir} + + + + + ############################################ + **** Back to project ${ant.project.name} **** + ############################################ + + + + + + + + + + + + + + + + + + + + + + Switching from instrumented to non-instrumented build: Deleting previous compilation output... + + + + + Creating output directories if needed... + + + + + + + + + + + + + + + + + ---------- + Handling aidl files... + + + + + + ---------- + Handling RenderScript files... + + + + + ---------- + Handling Resources... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Creating library output jar file... + + + + + + + Custom jar packaging exclusion: ${android.package.excludes} + + + + + + + + + + + + + Instrumenting classes from ${out.absolute.dir}/classes... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @${proguard.config} + -injars ${project.jars} + -outjars "${obfuscated.jar.file}" + -libraryjars ${android.libraryjars} + -dump "${obfuscate.absolute.dir}/dump.txt" + -printseeds "${obfuscate.absolute.dir}/seeds.txt" + -printusage "${obfuscate.absolute.dir}/usage.txt" + -printmapping "${obfuscate.absolute.dir}/mapping.txt" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Debug Package: ${out.final.file} + + + + + + + + + + + + + + + + + + + + + + + + + + + No key.store and key.alias properties found in build.properties. + Please sign ${out.packaged.file} manually + and run zipalign from the Android SDK tools. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ************************************************* + **** Android Manifest has debuggable=true **** + **** Doing DEBUG packaging with RELEASE keys **** + ************************************************* + + + + + + + + + + + + + + + + + + Signing final apk... + + + + + Release Package: ${out.final.file} + + + + + + + + + + + + + + + + + + + + + + + + + + + Instrumented Package: ${out.final.file} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + WARNING: Code Coverage is currently only supported on the emulator and rooted devices. + + + + + + + + Downloading coverage file into project directory... + + + + + + + Extracting coverage report... + + + + + + + + + + + + Cleaning up temporary files... + + + Saving the report file in ${basedir}/coverage/coverage.html + + + + + + + + + + + + + + + + + + + + + + + + + + + + Installing ${out.final.file} onto default emulator or device... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Install file not specified. + + 'ant install' now requires the build target to be specified as well. + + + ant debug install + ant release install + ant instrument install + This will build the given package and install it. + + Alternatively, you can use + ant installd + ant installr + ant installi + ant installt + to only install an existing package (this will not rebuild the package.) + + + + + + + + + + + + + + + + + + + + + + + + + + Could not find application package in manifest. Cannot run 'adb uninstall'. + + + + + + + + + + + + + + + + + + + + + + + + + + + + Could not find tested application package in manifest. Cannot run 'adb uninstall'. + + + + + + + + + + + + + + + Android Ant Build. Available targets: + help: Displays this help. + clean: Removes output files created by other targets. + The 'all' target can be used to clean dependencies + (tested projects and libraries)at the same time + using: 'ant all clean' + debug: Builds the application and signs it with a debug key. + The 'nodeps' target can be used to only build the + current project and ignore the libraries using: + 'ant nodeps debug' + release: Builds the application. The generated apk file must be + signed before it is published. + The 'nodeps' target can be used to only build the + current project and ignore the libraries using: + 'ant nodeps release' + instrument:Builds an instrumented package and signs it with a + debug key. + test: Runs the tests. Project must be a test project and + must have been built. Typical usage would be: + ant [emma] debug installt test + emma: Transiently enables code coverage for subsequent + targets. + install: Installs the newly build package. Must either be used + in conjunction with a build target (debug/release/ + instrument) or with the proper suffix indicating + which package to install (see below). + If the application was previously installed, the + application is reinstalled if the signature matches. + installd: Installs (only) the debug package. + installr: Installs (only) the release package. + installi: Installs (only) the instrumented package. + installt: Installs (only) the test and tested packages (unless + nodeps is used as well. + uninstall: Uninstalls the application from a running emulator or + device. Also uninstall tested package if applicable + unless 'nodeps' is used as well. + diff --git a/src/video_engine/main/test/android_test/default.properties b/src/video_engine/main/test/android_test/default.properties deleted file mode 100644 index c206f5858..000000000 --- a/src/video_engine/main/test/android_test/default.properties +++ /dev/null @@ -1,13 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system use, -# "build.properties", and override values to adapt the script to your -# project structure. - -# Indicates whether an apk should be generated for each density. -split.density=false -# Project target. -target=android-9