Question: Does anyone know if its possible to add specific files uncompressed to a Android APK file during the ANT build process using build.xml? All my files live in the *assets* folder and use the same extension. I do realise that i could use a different extension for the files that i don't want to be added compressed and specify, for example:

```
<nocompress extension="NoCompress" />

```

but this currently isn't an option for me.

I tried adding my own *aapt add* step after the *appt package* step in the *package-resource* section in *build.xml*:

```
<exec executable="${aapt}" taskName="add">
<arg value="add" />
<arg value="-v" />
<arg value="${out.absolute.dir}/TestAndroid.ap_" />
<arg value="${asset.absolute.dir}/notcompressed.and" />
</exec>

```

Which did add the file to the APK but it was compressed. :)

Is this possible or is a different extension the only way?

Thanks!

Answer: 
If building using gradle, then it seems you can provide the aapt flags like this:

```
android {
    aaptOptions {
        noCompress 'foo', 'bar'
        ignoreAssetsPattern "!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"
    }
}

```

<http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-aapt-options>
Just to provide closure for this one.

I don't think it is possible to mark individual files to be added uncompressed to the APK.

Being able to mark individual files as uncompressed to *aapt* could be useful. As would the addition of a *nocompress file* tag, eg:

```
<nocompress file="FileNoCompress.abc" />

```

:)