From fb8c9e962b75d7eef3163f2f10cbad428f6b1a98 Mon Sep 17 00:00:00 2001 From: Rachit Goyal Date: Fri, 21 Aug 2026 23:58:42 -0400 Subject: [PATCH] Document the coordinate JitPack actually serves Verified against JitPack with a throwaway snapshot build of master rather than by burning the 2.0.0 tag on a guess. Two things came out of it. The build itself is fine: master built ok on JitPack's openjdk17 image and registered both modules, so jitpack.yml, the JDK choice and dropping the pinned daemon JVM all hold up on their infrastructure. The coordinates in the docs did not hold up. A repository publishing more than one artifact is addressed as com.github..:, so the group carries a dot before the repository name: com.github.rayzone107.SegmentedProgressBar:segmentedprogressbar:2.0.0 com.github.rayzone107.SegmentedProgressBar:segmentedprogressbar-compose:2.0.0 The flat form the README documented works for the View artifact only, and by coincidence: JitPack reads the artifact id as a repository name, and this repository happens to be called that. Nothing is named segmentedprogressbar-compose, so that request comes back 401 while the dotted one returns 200. Documenting the dotted group for both keeps them consistent. Nothing in the build needs to change, because JitPack rewrites the published POM's group and version itself, including the Compose artifact's dependency on the base one. While checking the history: the tags on this repository are 1.00, 1.01 and tag_v1, not 0.0.1, which was only ever the version string inside the build. None of them resolve today either, since JitPack rebuilds on request and the 2018 build cannot run on current infrastructure. docs/MIGRATION.md now says so rather than implying an upgrade path that was never working. Co-Authored-By: Claude Opus 5 (1M context) --- README.md | 31 ++++++++++++++++++++++++------- docs/MIGRATION.md | 31 +++++++++++++++++++++++++------ 2 files changed, 49 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 26c9aa1..51b8f23 100644 --- a/README.md +++ b/README.md @@ -76,10 +76,10 @@ Then take whichever artifacts you need: ```kotlin dependencies { // The View. No Compose dependency. - implementation("com.github.rayzone107:segmentedprogressbar:2.0.0") + implementation("com.github.rayzone107.SegmentedProgressBar:segmentedprogressbar:2.0.0") // Optional: the Jetpack Compose bindings. - implementation("com.github.rayzone107:segmentedprogressbar-compose:2.0.0") + implementation("com.github.rayzone107.SegmentedProgressBar:segmentedprogressbar-compose:2.0.0") } ``` @@ -87,10 +87,23 @@ They are separate artifacts on purpose, so a View-only project never inherits th Compose runtime. The Compose artifact depends on the View one for the shared geometry and option types, so taking both never gives you two copies of anything. +> [!IMPORTANT] +> Mind the group: `com.github.rayzone107.SegmentedProgressBar`, with a **dot** +> before the repository name, not `com.github.rayzone107:`. That is how JitPack +> addresses a repository publishing more than one artifact. +> +> The shorter `com.github.rayzone107:segmentedprogressbar` does resolve, by +> coincidence: JitPack reads the artifact id as a repository name, and this +> repository happens to be called that. There is no repository named +> `segmentedprogressbar-compose`, though, so the Compose artifact resolves only +> under the dotted group. Use the dotted form for both and they stay consistent. +> Both coordinates are listed on the +> [JitPack build page](https://jitpack.io/#rayzone107/SegmentedProgressBar) for +> each tag if you would rather copy them from there. + > [!NOTE] > JitPack builds each tag on first request, so the very first resolve after a -> release can take a minute. The exact coordinate for a tag is printed on that -> tag's [JitPack build page](https://jitpack.io/#rayzone107/SegmentedProgressBar). +> release takes a few minutes. Later resolves are served from its cache. --- @@ -819,9 +832,13 @@ under R8 with no configuration on your side. Most code needs no changes. See [docs/MIGRATION.md](docs/MIGRATION.md) for the full list; the short version: -- **The coordinate is `com.github.rayzone107:segmentedprogressbar`.** The 0.0.1 - README told people to depend on `com.github.rayzone107:durationview`, which is a - different library of mine entirely. +- **The coordinate changed**, to + `com.github.rayzone107.SegmentedProgressBar:segmentedprogressbar`. The extra dot + is JitPack's addressing for a repository with more than one artifact, which this + one now is. Worth knowing either way: the 0.0.1 README told people to depend on + `com.github.rayzone107:durationview`, a different library of mine entirely, and + the tags that did build, `1.00` and `tag_v1`, no longer resolve at all, because + JitPack cannot build 2018 Gradle any more. - **`setBackgroundColor(int)` still works** but is deprecated, because it shadows `View.setBackgroundColor` with a different meaning. Use `setProgressBarBackgroundColor(int)` instead, the method the old README diff --git a/docs/MIGRATION.md b/docs/MIGRATION.md index 10432c8..b07929c 100644 --- a/docs/MIGRATION.md +++ b/docs/MIGRATION.md @@ -19,7 +19,8 @@ supports below API 26, you cannot use 2.0.0. ``` Manifest merger failed : uses-sdk:minSdkVersion 21 cannot be smaller than -version 26 declared in library [com.github.rayzone107:segmentedprogressbar:2.0.0] +version 26 declared in library +[com.github.rayzone107.SegmentedProgressBar:segmentedprogressbar:2.0.0] ``` There is no workaround other than raising your own `minSdk`, or staying on 0.0.1. @@ -130,14 +131,32 @@ bar.divisions = 10 // indices 3 and 7 are now revealed ## 9. Dependency coordinate -The 0.0.1 README documented the coordinate as -`com.github.rayzone107:durationview:0.0.1`, which was a copy-paste error from -another project. The correct 2.0.0 coordinate is: +The 2.0.0 coordinate is: ```kotlin -implementation("com.github.rayzone107:segmentedprogressbar:2.0.0") +implementation("com.github.rayzone107.SegmentedProgressBar:segmentedprogressbar:2.0.0") ``` +Note the **dot** before the repository name. That is how JitPack addresses a +repository publishing more than one artifact, which this one now does. The +artifact id itself is unchanged. + +`com.github.rayzone107:segmentedprogressbar` also resolves, since JitPack reads +the artifact id as a repository name and this repository happens to be called +that, but there is no repository named `segmentedprogressbar-compose`, so the +Compose artifact needs the dotted group. Using it for both keeps them consistent. + +Whatever you had before was probably not working anyway: + +- The 0.0.1 README documented the coordinate as + `com.github.rayzone107:durationview:0.0.1`, a copy-paste error naming a + different library of mine entirely. +- The version was never `0.0.1` as far as JitPack is concerned. It serves by git + tag, and the tags on this repository are `1.00`, `1.01` and `tag_v1`. The `1.01` + build failed even at the time. +- None of them resolve today. JitPack rebuilds on request, and the 2018 build + cannot run on current infrastructure. + ## 10. Things that did *not* change - The class name and package: `com.rachitgoyal.segmented.SegmentedProgressBar`. @@ -194,7 +213,7 @@ remaining caveat is that a drop shadow forces a software layer. There is now a second artifact if you want a Composable rather than a View: ```kotlin -implementation("com.github.rayzone107:segmentedprogressbar-compose:2.0.0") +implementation("com.github.rayzone107.SegmentedProgressBar:segmentedprogressbar-compose:2.0.0") ``` It shares the option enums and the layout maths with the View, so the two render