sinkcup / antdemo Goto Github PK
View Code? Open in Web Editor NEW安卓自动打包ant auto build Android Package
Home Page: http://www.cnblogs.com/sink_cup/p/android-ant-auto-release.html
License: BSD 3-Clause "New" or "Revised" License
安卓自动打包ant auto build Android Package
Home Page: http://www.cnblogs.com/sink_cup/p/android-ant-auto-release.html
License: BSD 3-Clause "New" or "Revised" License
如果项目依赖了lib项目,那些lib项目里可能没有build.xml
,或者build.xml
是老版本的,会导致打包失败。
需要到每个项目里去手动执行 android update project xxx,如果依赖了10个lib,这就是体力活啊……
DRY是可耻的,所以要开发此功能。
自定义的ant任务应该写在 custom_rules.xml
中,而不应该修改build.xml
,应使用命令自动生成,比如:
android update project -p . -s -t "android-19"
所以.gitignore
忽略build.xml
。由于上面的命令太长太难记,所以开发了Makefile
,在项目目录中执行这个即可:
make
当前版本编译有错,我已经进行了修正。并且增加了批量打包功能。
新版本地址:
https://github.com/joedan0104/AntDemo
有兴趣的同学可以参考。
版本将遵守《语义化版本》
http://semver.org/lang/zh-CN/
ant auto-release -DUMENG_CHANNEL=smartisanAppStore
BUILD FAILED
D:\AntDemo\custom_rules.xml:13: The following error occurred while executing thi
s line:
D:\AntDemo\custom_rules.xml:66: Execute failed: java.io.IOException: Cannot run
program "ant" (in directory "D:\AntDemoTmp"): CreateProcess error=2, ?????????
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
at java.lang.Runtime.exec(Runtime.java:617)
at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Jav
a13CommandLauncher.java:58)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:428)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:442)
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:628)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
git commit时,自动检查代码规范,如果不符合,则拒绝commit。
你好,我尝试使用你的脚本去修改包名,当执行:
ant auto-release -Dpackage=com.example.ant.beta时,出现aidl文件错误,这个怎么改?
直接运行 ant auto-release会出错,然后<exec dir="${auto.project.tmp.dir}" executable=“配置自己的ant程序路径”,修改了之后显示success了,但是没看到打好的包生成在哪里呢?谢谢。
\custom_rules.xml:8: The following error occurred while executing this line:
\custom_rules.xml:66: Execute failed: java.
io.IOException: Cannot run program "ant" (in directory "D:\soft\android\workspace\packageTestTmp"): CreateProcess error=2, ?????????
修改文档,加入make的使用说明。
准备发版1.4
团队开发时,需要 定时打包开发版(或者一旦git提交就打包)、发送邮件给大家下载升级。
后续功能:自动上传到自动更新服务(比如友盟自动更新组件),大家OTA升级即可,无需发邮件下载了。
不过友盟的自动更新组件没有API,只能人工网页上传,很不方便。待调研其他服务商是否有自动更新服务。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.