我试图连接文件名和版本号。
版本来自local.properties
sdk.dir=E:/Android/android-sdk-windows
sdk.version=1.6
ant文件build_factory.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="Main release build" default="release" basedir="..">
<target name="configFactory">
<echo message="sdk.dir=f:/build/android-sdk-windows" file="build/local.properties" />
</target>
<target name="release">
<ant antfile="build/build_sdk_platform.xml" target="build_prod" />
<ant antfile="build/build_sdk.xml" target="javadocs" />
<ant antfile="build/build_sample.xml" target="prepareSources" />
<tar basedir="workspace" destfile="MapAndroidSDK-${sdk.version}.tar" />
</target>
最后我想要的是名为MapAndroidSDK-1.6.jar的文件。除了.tar文件
之外,所有内容都已构建完成[编辑]最后,tar被命名为MapAndroidSDK-${sdk.version}.tar而不是MapAndroidSDK-1.6.tar
在控制台上,我得到:
modify_path:
[copy] Copying 1 file to c:hudsonworkspaceemb-android-sdk-trunkMapSamplelibs
[copy] Copying 1 file to c:hudsonworkspaceemb-android-sdk-trunkMapSample
[copy] Copying 1 file to c:hudsonworkspaceemb-android-sdk-trunkMapSample
[copy] Copying 179 files to c:hudsonworkspaceemb-android-sdk-trunkworkspaceMapSample
[tar] Building tar: c:hudsonworkspaceemb-android-sdk-trunkMapAndroidSDK-${sdk.version}.tar
[tar] Entry: doc/com/Map/resource/proto/class-use/LocationByQueryRequestProtos.LocationByQueryRequest.Builder.html longer than 100 characters.
[tar] Resulting tar file can only be processed successfully by GNU compatible tar commands
[tar] Entry: doc/com/Map/resource/proto/class-use/ServiceCategoriesRequestProtos.ServiceCategoriesRequest.Builder.html longer than 100 characters.
[tar] Entry: doc/com/Map/resource/proto/class-use/ServiceCategoriesResponseProtos.ServiceCategoriesResponse.Builder.html longer than 100 characters.
[tar] Entry: doc/com/Map/resource/proto/class-use/ServiceCategoriesResponseProtos.ServiceCategoriesResponse.html longer than 100 characters.
您应该阅读local.properties
:
<property file="local.properties"/>
之后可以使用sdk.version