Skip to content

Instantly share code, notes, and snippets.

@lordscales91
Last active December 9, 2016 14:39
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lordscales91/58f243b8203a6653bca12ccfe423a9f5 to your computer and use it in GitHub Desktop.
Save lordscales91/58f243b8203a6653bca12ccfe423a9f5 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="gen-libs">
<!--
This little magic Ant script is intended to be run from Maven's antrun plugin. However, it
can still be run from ant provided that you properly set it up(uncomment taskdef) and
give the required parameters it should work.
Parameters:
- input.dir the directory containing the AAR libs
- output.dir the directory to store the generated libprojects
-->
<!-- <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="CONFIGURE-ME" /> -->
<target name="unpack-aar">
<basename file="${aarlib}" property="libfolder" suffix=".aar" />
<unzip dest="${output.dir}/${libfolder}" src="${aarlib}">
<globmapper from="classes.jar" to="libs/${libfolder}.jar" />
</unzip>
</target>
<target name="gen-libs">
<foreach target="unpack-aar" param="aarlib" inheritall="true">
<fileset dir="${input.dir}">
<include name="*.aar" />
</fileset>
</foreach>
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment