The build tool that broke our widgets is working again on our test builds, with checks that watch it this time. Here's how we got there, and what's left before Lupenote 1.3.
In the 1.2 devlog we told you why we switched off R8, the tool that shrinks Android apps, and said we were aiming to bring it back in 1.3. It's now back in the code we're building 1.3 from. It isn't in the version on your phone: Lupenote 1.2.3 still ships without it, and R8 won't reach you until we've finished testing.
Why bring it back at all
R8 removes code an app doesn't use. Starting in February 2027, Google Play expects larger apps like Lupenote to shrink, optimize and obfuscate at least 25% of their code. We'd rather get there early and carefully than late and in a hurry.
What was really going wrong
Some pieces of Lupenote are created by name while the app runs, such as the handlers behind widget taps. Recent Android build tools got stricter about what R8 keeps: the piece itself stayed, but the part used to create it was removed. Nothing crashed. The feature just stopped working.
The bug that got past every check
Our first fix looked finished. Widgets worked and every automated check passed. Then we opened the handwriting settings on that build, and handwriting was dead.
It was a different kind of mistake. Inside Google's handwriting library is a small on/off switch that starts off and turns on a moment later. R8 saw that the code only ever turns it on, decided it must always be on, and removed the switch. The library needed that first moment of "off", so it failed every time it started.
Our automated checks missed it because all they did was confirm that the pieces were there. None of them actually used the feature. Now our tests do.
What we do differently now
We leave more alone. R8 no longer touches Lupenote's own code, our widget and background-work libraries, or Google's handwriting library. It shrinks the rest.
Six checks on every release build. These are automated checks that run by themselves each time we build the app for release. If one of them finds something R8 broke, the build stops. One of them looks for the handwriting kind of mistake, and we confirmed that it fails on the version that had the bug.
Tests that use the app. These automated tests run on a shrunk build and use it the way you would: opening the handwriting settings, ticking a checklist widget, changing the calendar's month, and checking the widgets again after a restart and an update.
Where it stands
Lupenote's code goes from 46.7 MB to about 16.2 MB, around 65% less. Code is only one part of the app, so the download itself will shrink by much less than that. About 38% of the code now counts toward each of Google's three measures, which need 25%. Going further is possible, but we chose the safer setting.
We installed the shrunk test build as an update on a real Android phone with all six widgets on its home screen. The widgets, the handwriting model and the theme carried over, handwriting turned into text, picture text was searchable, a designed PDF saved, and the widgets came back after a restart. We found nothing that R8 had broken.
We still have to test the real update through Google Play, buying Pro, and more phones and Android versions.
A fix you'll notice
While testing, we found that a new file made inside a folder could land in the main Library instead. We're fixing that for 1.3, so a file you make in a folder stays in that folder.
What's next for 1.3
Lupenote 1.3 is coming soon, with a few more features and updates still to add. Every addition gets tested on the shrunk build as it goes in. When they're all in, we'll stress test the whole app, feature by feature, including old Android versions, full storage, no internet, damaged files, and updates from earlier versions. We don't have a date to share yet. It ships when it passes.
If you're on an older version, please update to 1.2.3 on Google Play. Your notes, settings and Pro carry over.
Thanks for your patience, and for writing with us. Tell us what you think with the Feedback button in Settings, or at [email protected].
Obsidian Wolf
Comments
No comments yet. Be the first to say hello.