Android 条件蚂蚁规则
这是我的自定义_rules.xml,从“build.xml”调用Android 条件蚂蚁规则,android,ant,Android,Ant,这是我的自定义_rules.xml,从“build.xml”调用 <?xml version="1.0" encoding="UTF-8"?> <project name="custom_rules"> <xmlproperty file="AndroidManifest.xml" prefix="mymanifest" collapseAttributes="true"/> <property name="build.dir" value="relea
<?xml version="1.0" encoding="UTF-8"?>
<project name="custom_rules">
<xmlproperty file="AndroidManifest.xml" prefix="mymanifest" collapseAttributes="true"/>
<property name="build.dir" value="releases" />
<property name="version.name" value="${mymanifest.manifest.android:versionName}" />
<property name="version.code" value="${mymanifest.manifest.android:versionCode}" />
<property name="out.file" value="${ant.project.name}-${version.name}_${version.code}.apk" />
<target name="-post-build">
<echo>Output filename: ${out.file}</echo>
<copy file="${out.final.file}" tofile="${build.dir}/${out.file}"/>
</target>
输出文件名:${out.file}
我想做的是,只有在使用
ant release我通常处理它的方式:
- 将“释放”目标设置为属性。比如:
- 向目标添加一个if,以便仅在有发布时执行。比如:
…