Trying to build my android project with Buildr (Apache), but can't find any info on how to do it, and my attempts all fail. A example buildfile or a "no it dosent work" answer would be good :)

有帮助吗?

解决方案

We have generated android packages with buildr.

  1. You have to call the aapt code generator before compiling. There is an example in the buildr wiki how to hook up a source generator.

    system( @aapt, "package", "-m", "-J", to, "-M", _("AndroidManifest.xml"), "-S", _("res"), "-I", @androidjar, from )

  2. For the apk we have a custom package task, which calls dx, aapt and apkbuildr

    system( @aapt, "package", "-f", "-M", ("AndroidManifest.xml"), "-F", apkdir + "/resources.ap", "-S", _("res"), "-I", @androidjar )

    system( @apkbuilder, apkdir + "/" + projectname + "signed.apk", "-z", apkdir + "/resources.ap", "-f", apkdir + "/classes.dex", "-d", "-rj", _(:target, "libs"))

    system( @apkbuilder, apkdir + "/" + projectname + "unsigned.apk", "-z", apkdir + "/resources.ap", "-f", apkdir + "/classes.dex", "-u", "-rj", _(:target, "libs"))

其他提示

It is best to ask the Buildr community using the users mailing list, since we don't all check Stack Overflow.

I know Pepijn worked on a plugin some time ago (see this thread) and apparently novoda had developed something as well, but it's not on github anymore.

So the answer is likely no, it doesn't work out of the box. It looks like there are ways to make it work and people to partner with to make it happen if you want.

Thanks for using Buildr!

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top