Skip to content

Modernize 2.0.0 - #6

Merged
rayzone107 merged 3 commits into
masterfrom
modernize-2.0.0
Aug 21, 2026
Merged

Modernize 2.0.0#6
rayzone107 merged 3 commits into
masterfrom
modernize-2.0.0

Conversation

@rayzone107

Copy link
Copy Markdown
Owner

No description provided.

rachit-mistplay and others added 3 commits August 21, 2026 17:01
The first substantive change in eight years. The toolchain, the code, the
tests and the docs all move at once, because the old build could not run on
a current JDK and nothing could be verified until it did.

Toolchain and build:
  * Gradle 9.7.1, AGP 9.3.1, Kotlin DSL, a version catalog, compileSdk 37,
    minSdk 26, Java 17. AGP 9 supplies Kotlin itself, so the Kotlin plugin
    is gone from every module.
  * Support Library to AndroidX. Publishing moves from the old
    maven-push.gradle to maven-publish, and a second artifact ships the
    Jetpack Compose bindings.
  * CI on every push, running the same tests and lint the release does.

The view is rewritten in Kotlin, keeping the 0.0.1 Java API compiling, and
a long list of rendering bugs is fixed: dividers vanishing on an empty bar,
segments bleeding under the divider to their right, reset() resetting the
wrong thing, setters that never repainted, and corner rounding that painted
square patches over a round rect. See CHANGELOG.md for the full list.

New: any subset of segments can be lit, which is the point of the library;
height bands, corner modes, a drop shadow, entry and toggle and recurring
animations, tap to toggle, RTL, padding, instance state, accessibility and
a Compose renderer that shares the View's geometry so the two stay
identical.

The drop shadow is worth calling out. It follows the bar's outline: one
shape, blurred once, drawn before any fill and clipped to the outside of
the bar. Blurring cell by cell instead made lit segments twice as dark as
unlit ones, grew a dark tick above every gap, and outlined each cell where
the shadow sat under an anti-aliased edge. Pixel tests cover all of it, in
both renderers, since neither shows up in a list of draw calls.

259 tests, no lint findings.

Security: gradle.properties committed a Nexus password and a GPG signing
passphrase in plain text. They are out of the working tree, but they remain
in this repository's public history and must be treated as compromised.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
gradle/gradle-daemon-jvm.properties, generated at some point by Studio's
updateDaemonJvm, pinned the daemon to JetBrains JDK 25 and carried foojay
download URLs for it. Every machine without that exact JVM, which means
JitPack's openjdk17 image and the Temurin 17 that CI installs, would have
had to download a 200MB JVM before it could build, or fail outright. That
is a poor thing to make a release depend on.

Compilation is already pinned where it matters, by jvmToolchain(17) and
compileOptions in both library modules, so the daemon only needs to be new
enough to run Gradle and AGP. Verified with tests, lint and the exact
publish command jitpack.yml runs, all on JDK 17.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The landing page was a wall of prose with one 300px screenshot from 2018,
and its "how to use" section only ever showed XML plus Kotlin. It now has:

  * A "How to use" section covering all four ways in: XML, Kotlin, Java and
    Jetpack Compose, each complete enough to copy, plus a table of the few
    places the Compose parameter names deliberately differ.
  * A "Configuration in detail" section, one subsection per option, each
    with an image of that specific configuration and the XML, Kotlin and
    Compose forms side by side.
  * 17 generated images in docs/images, replacing Image.png.

The images come from DocsScreenshotTest, which renders every configuration
the README documents. It is a test first: it asserts each one draws
something other than a blank plate, which is the failure mode a stale
committed screenshot hides perfectly. Writing the PNGs is behind -Pdocs, so
an ordinary test run never touches tracked files, and regenerating the whole
set after a rendering change is one command.

Also gone: the Google Play link for the old sample app, which no longer
exists, and the claim that the 0.0.1 coordinate was what the old README
said it was. That README told people to depend on durationview, a different
library entirely; docs/MIGRATION.md now says so.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@rayzone107
rayzone107 merged commit c01fd33 into master Aug 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants