4 Commits

Author SHA1 Message Date
Igor Eisberg
b49e77087d
refactor: clean up external pull parser and introduce brut.j.xml (#3709)
* 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.
2024-10-15 06:54:03 -04:00
dependabot[bot]
2ff81eb55f
build(deps): bump com.google.guava:guava from 32.0.1-jre to 33.3.0-jre (#3670)
* build(deps): bump com.google.guava:guava from 32.0.1-jre to 33.3.0-jre

Bumps [com.google.guava:guava](https://github.com/google/guava) from 32.0.1-jre to 33.3.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: fix r8 warning on RetainedWith

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Connor Tumbleson <connor.tumbleson@gmail.com>
2024-09-07 14:45:55 -04:00
Connor Tumbleson
5c1716ffef
Workaround invalid org.xmlpull loader with R8 (#3604)
* build: move to semi-modern xmlpull version

* fix: prevent stripping invalid service loader

* fix: rework the 'release'/'publish' plan
2024-05-17 19:43:30 -04:00
Connor Tumbleson
e69ecb578d
Reproducible Builds (#3559)
* fix: remove ShadowJar plugin

 - unable to control file dates of archive entries

* refactor: use native Gradle "fatJar" method

* refactor: drop proguard for r8

* fix: wire up R8

* wip: remove fail-fast

* Revert "wip: remove fail-fast"

This reverts commit 5d005bf82e87c89efa5552ee8f8e9c0a569aea0d.

* fix: suppress unused proguard keep messages

* fix: require java11+ for r8
2024-04-07 11:45:55 -04:00