Modernize 2.0.0 - #6
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.