我尝试连接文件名和版本号。
版本来自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:\hudson\workspace\emb-android-sdk-trunk\MapSample\libs
[copy] Copying 1 file to c:\hudson\workspace\emb-android-sdk-trunk\MapSample
[copy] Copying 1 file to c:\hudson\workspace\emb-android-sdk-trunk\MapSample
[copy] Copying 179 files to c:\hudson\workspace\emb-android-sdk-trunk\workspace\MapSample
[tar] Building tar: c:\hudson\workspace\emb-android-sdk-trunk\MapAndroidSDK-${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.
答案 0 :(得分:1)
您应该阅读local.properties
:
<property file="local.properties"/>
您可以使用sdk.version