1.本项目使用Ant工具,确认安装Ant插件
image.png
2.配置ant
image.png
image.png
3.打开one_trunk_android任务,配置界面
image.png
4.增加构建步骤,选中With Ant,执行-buildfile ${WORKSPACE}/jenkins/android_all/build.xml(你的build.xml路径)
image.png
image.png
5.一个完整的build.xml与settings.properties
build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="one" default="main" basedir=".">
<property file="settings.properties"/>
<property name="VERSION_STRING" value="${app.version}"/>
<target name="main" depends="android">
<echo message="do main"/>
</target>
<target name="android" depends="compile-android">
<echo message="do android"/>
</target>
<target name="compile-android" depends="clean">
<echo message="Compiling unity project for android version ${VERSION_STRING}"/>
</target>
<target name="clean">
<echo message="Cleaning Build Space"/>
</target>
</project>
settings.properties
app.version = 1.2.1
6.打开控制台输出,看到inished: SUCCESS,Ant配置成功
image.png
网友评论