mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-01 02:12:58 +08:00
Upgrading to Ice Cream Sandwich
This commit is contained in:
parent
1f2f9a02dd
commit
543fe1f43f
@ -9,70 +9,54 @@
|
|||||||
</loadfile>
|
</loadfile>
|
||||||
|
|
||||||
<!-- The local.properties file is created and updated by the 'android' tool.
|
<!-- The local.properties file is created and updated by the 'android' tool.
|
||||||
It contains the path to the SDK. It should *NOT* be checked in in Version
|
It contains the path to the SDK. It should *NOT* be checked into
|
||||||
Control Systems. -->
|
Version Control Systems. -->
|
||||||
<property file="local.properties" />
|
<loadproperties srcFile="local.properties" />
|
||||||
|
|
||||||
<!-- The build.properties file can be created by you and is never touched
|
<!-- The ant.properties file can be created by you. It is only edited by the
|
||||||
by the 'android' tool. This is the place to change some of the default property values
|
'android' tool to add properties to it.
|
||||||
used by the Ant rules.
|
This is the place to change some Ant specific build properties.
|
||||||
Here are some properties you may want to change/update:
|
Here are some properties you may want to change/update:
|
||||||
|
|
||||||
application.package
|
|
||||||
the name of your application package as defined in the manifest. Used by the
|
|
||||||
'uninstall' rule.
|
|
||||||
source.dir
|
source.dir
|
||||||
the name of the source directory. Default is 'src'.
|
The name of the source directory. Default is 'src'.
|
||||||
out.dir
|
out.dir
|
||||||
the name of the output directory. Default is 'bin'.
|
The name of the output directory. Default is 'bin'.
|
||||||
|
|
||||||
Properties related to the SDK location or the project target should be updated
|
For other overridable properties, look at the beginning of the rules
|
||||||
using the 'android' tool with the 'update' action.
|
files in the SDK, at tools/ant/build.xml
|
||||||
|
|
||||||
This file is an integral part of the build system for your application and
|
Properties related to the SDK location or the project target should
|
||||||
should be checked in in Version Control Systems.
|
be updated using the 'android' tool with the 'update' action.
|
||||||
|
|
||||||
|
This file is an integral part of the build system for your
|
||||||
|
application and should be checked into Version Control Systems.
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<property file="build.properties" />
|
<property file="ant.properties" />
|
||||||
|
|
||||||
<!-- The default.properties file is created and updated by the 'android' tool, as well
|
<!-- The project.properties file is created and updated by the 'android'
|
||||||
as ADT.
|
tool, as well as ADT.
|
||||||
This file is an integral part of the build system for your application and
|
|
||||||
should be checked in in Version Control Systems. -->
|
This contains project specific properties such as project target, and library
|
||||||
<property file="default.properties" />
|
dependencies. Lower level build properties are stored in ant.properties
|
||||||
|
(or in .classpath for Eclipse projects).
|
||||||
|
|
||||||
|
This file is an integral part of the build system for your
|
||||||
|
application and should be checked into Version Control Systems. -->
|
||||||
|
<loadproperties srcFile="project.properties" />
|
||||||
|
|
||||||
<!-- We need to setup the double quote. -->
|
|
||||||
<property name="dblQuote">"</property>
|
<property name="dblQuote">"</property>
|
||||||
|
|
||||||
<!-- Custom Android task to deal with the project target, and import the proper rules.
|
<!-- quick check on sdk.dir -->
|
||||||
This requires ant 1.6.0 or above. -->
|
<fail
|
||||||
<path id="android.antlibs">
|
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
|
||||||
<pathelement path="${sdk.dir}/tools/lib/anttasks.jar" />
|
unless="sdk.dir"
|
||||||
<pathelement path="${sdk.dir}/tools/lib/sdklib.jar" />
|
/>
|
||||||
<pathelement path="${sdk.dir}/tools/lib/androidprefs.jar" />
|
|
||||||
<pathelement path="${sdk.dir}/tools/lib/apkbuilder.jar" />
|
|
||||||
<pathelement path="${sdk.dir}/tools/lib/jarutils.jar" />
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<taskdef name="setup"
|
<!-- version-tag: custom -->
|
||||||
classname="com.android.ant.SetupTask"
|
<import file="${sdk.dir}/tools/ant/build.xml" />
|
||||||
classpathref="android.antlibs" />
|
|
||||||
|
|
||||||
<!-- Execute the Android Setup task that will setup some properties specific to the target,
|
|
||||||
and import the build rules files.
|
|
||||||
|
|
||||||
The rules file is imported from
|
|
||||||
<SDK>/platforms/<target_platform>/templates/android_rules.xml
|
|
||||||
|
|
||||||
To customize some build steps for your project:
|
|
||||||
- copy the content of the main node <project> from android_rules.xml
|
|
||||||
- paste it in this build.xml below the <setup /> task.
|
|
||||||
- disable the import by changing the setup task below to <setup import="false" />
|
|
||||||
|
|
||||||
This will ensure that the properties are setup correctly but that your customized
|
|
||||||
build steps are used.
|
|
||||||
-->
|
|
||||||
<setup />
|
|
||||||
|
|
||||||
<target name="check-javascript" depends="build-javascript">
|
<target name="check-javascript" depends="build-javascript">
|
||||||
<delete dir="assets/lib"/>
|
<delete dir="assets/lib"/>
|
||||||
@ -122,7 +106,8 @@
|
|||||||
<fileset file="assets/www/index.html" />
|
<fileset file="assets/www/index.html" />
|
||||||
<!-- <fileset file="../bin/templates/project/assets/www/index.html" /> -->
|
<!-- <fileset file="../bin/templates/project/assets/www/index.html" /> -->
|
||||||
</replaceregexp>
|
</replaceregexp>
|
||||||
<replaceregexp match="phonegapVersion = [\u0022].*[\u0022];" replace="phonegapVersion = ${dblQuote}${version}${dblQuote};" byline="true">
|
<!-- This is sketchy, but it works, ${dblQuote} does not -->
|
||||||
|
<replaceregexp match="phonegapVersion = [\u0022].*[\u0022];" replace='phonegapVersion = ${dblQuote}${version}${dblQuote};' byline="true">
|
||||||
<fileset file="src/com/phonegap/Device.java" />
|
<fileset file="src/com/phonegap/Device.java" />
|
||||||
</replaceregexp>
|
</replaceregexp>
|
||||||
|
|
||||||
@ -133,7 +118,7 @@
|
|||||||
<!-- Build PhoneGap jar file that includes all native code, and PhoneGap JS file
|
<!-- Build PhoneGap jar file that includes all native code, and PhoneGap JS file
|
||||||
that includes all JavaScript code.
|
that includes all JavaScript code.
|
||||||
-->
|
-->
|
||||||
<target name="jar" depends="build-javascript, compile">
|
<target name="jar" depends="build-javascript, -compile">
|
||||||
<jar jarfile="phonegap-${version}.jar" basedir="bin/classes" excludes="com/phonegap/R.class,com/phonegap/R$*.class"/>
|
<jar jarfile="phonegap-${version}.jar" basedir="bin/classes" excludes="com/phonegap/R.class,com/phonegap/R$*.class"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
@ -144,4 +129,5 @@
|
|||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
Loading…
Reference in New Issue
Block a user