Ant Task Summary

Hello (potential) contributors of App Inventor,
Throughout contributing to App Inventor, I found it was quite easy to forget certain ant build tasks and what they do; So below is a summary that I have made to have a quick look-up for some useful commands to increase productivity. Maybe some of you will find it useful!

Ant Task Description
dev_appserver.cmd --port=8888 --address=0.0.0.0 appengine/build/war Run appserver on port 8888 and localhost
ant Build everything
ant <target> Compile only specified target
ant RunLocalBuildServer Runs the build server (for building apks)
ant BlocklyCompile Only compile JavaScript in /blocklyeditor or lib/blockly files (run in /blocklyeditor directory)
ant comps Builds only components, pushes a fresh App Inventor Companion app to phone (if phone is connected via USB)
ant clean Clean build targets. Deletes all projects. Can solve some rare errors and incompatible code (e.g. when switching branches)
ant noplay Builds only the website
ant PlayApp Installs App Inventor Companion on Android phone
ant tests Run all tests
ant javadoc Generate Java-like documentation
ant extensions Build extensions
ant MakeAuthKey Create authentication key
14 Likes

You missed ant extensions and ant javadoc :ok_man:
Probably you have not used the last one, but I find it pretty useful, as it generates Java-like documentation. It is quite easy to find a particular Java function in the appinventor core, and its usage details.

8 Likes

This is the first time I see these commands when and why would an MIT AI2 developer need them or use them?

An MIT AI2 Developer is someone who changes and extends the sourcecode of App Inventor itself. An MIT AI2 User is someone who uses the online designer and blockeditor and builds apks.

The commands that are in this list are for AI2 Developers not for AI2 Users.

2 Likes

Hello,

I haven’t been able to get ant blockly to work. It doesn’t seem like it’s an available option. But I would love to be able to just recompile blockly (and have it work on the appserver).

Is this a target you added yourself? If so, would you mind sharing how you added it?

Alternatively I could just be doing something wrong hehe. Are you in the appinventory directory or the blocklyeditor directory when you run it?

Thank you so much for your time!
–Beka

Ah, that’s interesting, I believe the ant blockly used to be an older command a way back that was now changed. I believe the equivalent nowadays is to navigate to the appinventor/blocklyeditor ant run the ‘BlocklyCompile’ task (i.e. ant BlocklyCompile)

1 Like

You’re right! I completely forgot about ant extensions and the ant javadoc (which is still quite new to me). Unfortunately it seems I cannot find an option to edit the post anymore, but if I could, it would definitely be worthwhile to add them! (along with ant MakeAuthKey possibly since that’s another good one to remember when re-initializing the code base)

Edit: Added the suggested ant tasks.

@elatoskinas I’ve promoted you to a higher level, you should be able to edit older posts now.

1 Like