* refactor: ExtDataInput rework, source layout and formatting
Refactor ExtDataInput classes: ExtDataInput is now the extended interface,
ExtDataInputStream is an easy-to-use FilterInputStream implementing ExtDataInput
with static creator methods for big-endian and little-endian wrappers.
Refactor AaptManager class: unify aapt-related verifications to one class.
Replace Apache Commons' deprecated CountingInputStream with Google Guava's
equivalent with the same name. Apache's BoundedInputStream is an overkill
for our use case and its constructors are deprecated as well.
Normalize source layout to have a common and somewhat more standard order:
Static fields first, instance fields after, methods last.
Fix some formatting, like empty spaces or extra spaces and exception messages.
Renamed ResXmlPatcher to ResXmlUtils, as it has more purposes than just patching.
Renamed DirUtil to DirUtils, to match other utility classes naming convention.
Moved "properties/apktool.properties" to jar's root, to match smali/baksmali.
Moved Android Framework to "prebuilt", as it is just a prebuilt, looks out of
place among .class files.
@SuppressWarnings removed from Duo as there are quite a few unsafe assignments
of raw Duo[] instances to parameterized Duo<> variables in the project, this is
just Java being the primitive boilerplate it is, no point in fighting it.
No end-user changes.
Tested against a full ROM decompile/recompile, no issues found.
* small tweak
* last refinement
* missed a stream
* refactor: clean up external pull parser and introduce brut.j.xml
We have no need for an XML pull parser in the project,
it was only used for testing, which is now done with XPath.
The external xpp3 library from org.ogce is obsolete and has
the issue of including javax.xml.namespace.QName which conflicts
with the JRE implementation that exists for a very long time now.
This makes direct usages of QName produce very obscure NPEs that
took me hours to figure out. This patch will allow further
optimization that is WIP.
The external library was replaced by the basic xmlpull API.
The MXSerializer has been cleaned and the features used by apktool
have been integrated into the custom implementation, now part of
a separate module called brut.j.xml.
Writing has been optimized by buffering write operations, inspired
by KXmlSerializer used by Android itself.
A class XmlPullUtils also written that allows copying from a
XmlPullParser into a XmlSerializer with or without an EventHandler.
We use it for AndroidManifestPullStreamDecoder (with EventHandler,
to allow omitting the uses-sdk tag), and for ResXmlPullStreamDecoder
(direct copy, without EventHandler).
saveDocument in ResXmlPatcher was tweaked to output proper output -
a new line after declaration and a new line after root element's
end tag.
TL;DR mostly behind the scene refactor, no end user changes.
* feat: initial migration to kotlin
* feat: initial migration to kotlin
* fix: wire up dependencies
* fix: Deprecated tag for kotlin detection
* refactor: put all modules into sub-projects
* fix: include jar file (android framework)
* fix: add version message/info
* fix: wire up version/gitrev to properties
* fix: wire up proguard on cli
* fix: wire up proguard
* fix: wire up output cleaning command
* fix: drop license header on gradle files
- fully rewritten from scratch by myself
- no longer including license header on build files
* fix: add compile utf8/flags for java8
* refactor: remove unneeded curly braces
* feat: progress towards maven-publish
* build: publish to maven
* docs: update documentation
* refactor: prevent implicit order by removal of afterEvaluate
* build: remove unused license plugin