mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-28 22:17:50 +08:00
Fail the build gracefully with helpful error messages if the local.properties
file is missing, or if the commons-codec jar is missing, or if ant is not at the minimum required version. Also add a little more detail to README.md.
This commit is contained in:
parent
486eb149f2
commit
54caa6e438
@ -15,8 +15,8 @@ indicate that the project has yet to be fully endorsed by the ASF.
|
|||||||
Requires
|
Requires
|
||||||
---
|
---
|
||||||
|
|
||||||
- Java JDK 1.5
|
- Java JDK 1.5 or greater
|
||||||
- Apache ANT
|
- Apache ANT 1.8.0 or greater
|
||||||
- Android SDK [http://developer.android.com](http://developer.android.com)
|
- Android SDK [http://developer.android.com](http://developer.android.com)
|
||||||
- Apache Commons Codec [http://commons.apache.org/codec/](http://commons.apache.org/codec/)
|
- Apache Commons Codec [http://commons.apache.org/codec/](http://commons.apache.org/codec/)
|
||||||
|
|
||||||
|
@ -26,9 +26,37 @@
|
|||||||
</filterchain>
|
</filterchain>
|
||||||
</loadfile>
|
</loadfile>
|
||||||
|
|
||||||
<!-- The local.properties file is created and updated by the 'android' tool.
|
<!-- check that the version of ant is at least 1.8.0, as is needed
|
||||||
It contains the path to the SDK. It should *NOT* be checked into
|
for the dblQuote property -->
|
||||||
Version Control Systems. -->
|
<antversion property="thisantversion" atleast="1.8.0" />
|
||||||
|
<fail message="The required minimum version of ant is 1.8.0, you have ${ant.version}"
|
||||||
|
unless="thisantversion" />
|
||||||
|
|
||||||
|
<!-- check that commons codec is available. You should copy the codec jar to
|
||||||
|
framework/libs, as it is not included in the Cordova distribution.
|
||||||
|
The name of the jar file in framework/libs does not matter. -->
|
||||||
|
<available classname="org.apache.commons.codec.binary.Base64"
|
||||||
|
property="exists.base64"
|
||||||
|
ignoresystemclasses="true">
|
||||||
|
<classpath>
|
||||||
|
<pathelement path="${classpath}" />
|
||||||
|
<fileset dir="libs">
|
||||||
|
<include name="*.jar" />
|
||||||
|
</fileset>
|
||||||
|
</classpath>
|
||||||
|
</available>
|
||||||
|
<fail message="You need to put a copy of Apache Commons Codec jar in the framework/libs directory"
|
||||||
|
unless="exists.base64" />
|
||||||
|
|
||||||
|
<!-- The local.properties file is created and updated by the 'android'
|
||||||
|
tool. (For example "sdkdir/tools/android update project -p ." inside
|
||||||
|
of this directory where the AndroidManifest.xml file exists. This
|
||||||
|
properties file that gets built contains the path to the SDK. It
|
||||||
|
should *NOT* be checked into Version Control Systems since it holds
|
||||||
|
data about the local machine. -->
|
||||||
|
<available file="local.properties" property="exists.local.properties" />
|
||||||
|
<fail message="You need to create the file 'local.properties' by running 'android update project -p .' here."
|
||||||
|
unless="exists.local.properties" />
|
||||||
<loadproperties srcFile="local.properties" />
|
<loadproperties srcFile="local.properties" />
|
||||||
|
|
||||||
<!-- The ant.properties file can be created by you. It is only edited by the
|
<!-- The ant.properties file can be created by you. It is only edited by the
|
||||||
|
Loading…
Reference in New Issue
Block a user