How do I execute the aapt command?

Hi there, straight to business:

Preconditions: One action plugin with
org.jetbrains.android
dependency in plugin.xml.

Requirment: to be able to run the

appt
command from the actionPerformed method's context.

Yes, I can always just bundle my plugin with aapt.jar but I strolngly would like to avoid this external dependency as long as this library is already used by android plugin.
I also suspect that android plugin may give me the benefit of full aapt related class hierarchy: service/manager, task and so on.

Thanks in advance.
2 comments
Comment actions Permalink

If your action requires Android SDK configured for project or module, you can get IAndroidTarget object using AndroidPlatform.getInstance().getTarget() and then pass it to the one of methods of AndroidApt class.

0
Comment actions Permalink

Thank you, AndroidApt.packageResources() did the trick!

0

Please sign in to leave a comment.