ant条件逻辑

<condition property="sdk-folder"
value="E:\android\android-sdk\adt-bundle-windows-x86_64-20130219\sdk"
else="${env.ANDROID_SDK_HOME}" >
  <or>
    <equals arg1="${env.ANDROID_SDK_HOME}" arg2=""/>
    <not>
      <isset property="env.ANDROID_SDK_HOME"/>
    </not>
  </or>
</condition>

上述文本的逻辑就是

if(env.ANDROID_SDK_HOME==NULL || env.ANDROID_SDK_HOME == "")

{

     sdk-folder = "E:\android\android-sdk\adt-bundle-windows-x86_64-20130219\sdk";

}else

{

    sdk-folder = env.ANDROID_SDK_HOME

}

posted on 2013-07-05 00:28  谷底望月  阅读(338)  评论(0编辑  收藏  举报

导航