开发者

Concatenate from .properties into an output file

开发者 https://www.devze.com 2023-03-22 02:54 出处:网络
I tried to concatenate a file name and version number. The version isfrom local.properties sdk.dir=E:/Android/android-sdk-windows

I tried to concatenate a file name and version number.

The version is from local.properties

sdk.dir=E:/Android/android-sdk-windows
sdk.version=1.6

My ant file 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>

What I want at the end is the file named MapAndroidSDK-1.6.jar. Everything is built except the .tar file

[Edit] In the end , the tar is named MapAndroidSDK-${sdk.version}.tar instead of MapAndroidSDK-1.6.tar

In the console, I get :

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 charac开发者_JAVA百科ters.
      [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.


You should read local.properties:

<property file="local.properties"/>

After you can use sdk.version

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号