Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Contributing

Goldberry is Apache 2.0 with no contributor agreement, and every change passes the same gates whether it comes from a maintainer or from a stranger.

A change is a pull request against master on GitHub. This chapter says what the repository expects of one. The five chapters after it say how to build, where things live, what the tests check, how a release goes out, and how a decision is written down.

The licence

The code is under the Apache License 2.0. There is no CLA to sign. A pull request is a contribution under that licence, and LICENSE and NOTICE ship inside every jar under META-INF.

Third-party software is disclosed in THIRD-PARTY-NOTICES.md and licenses/, and the two are held together by a task:

./gradlew checkLicenses

A dependency named in one and not the other fails the build.

What a change passes

./gradlew check is the gate. CI runs the same thing on Linux, macOS and Windows, and a pull request is green only when all three are.

GateWhat it holdsFixed by
FormattingEvery Java file matches palantir-java-format./gradlew spotlessApply
Error Prone and NullAwaysrc/main compiles with no finding, and every package is @NullMarkedReading the finding
PMDThe hand-picked rules in config/pmd/ruleset.xmlReading the finding
SpotBugsReports only. build/reports/spotbugs/main.html per moduleNothing. It does not gate
Tests, twiceThe suite passes bound reflectively and again bound ahead of timeThe test, or the code
GoldensEvery reference image matches what the code draws./gradlew blessGoldens, then review the diff
Export listEvery symbol bound in Java is exported, and nothing exported is unboundEditing goldberry.symbols
package-infoEvery package has one, with a doc comment and @NullMarkedWriting it
JavadocA [link] in a published module resolvesFixing the link
MarkdownNo trailing whitespace, a final newline./gradlew formatMarkdown
LicencesTHIRD-PARTY-NOTICES.md and licenses/ agreeEditing both

Tests and gates says what each one runs and why.

Tip

Run ./gradlew spotlessApply check before pushing. The formatter is the one gate that fixes itself.

A widget arrives whole

A new widget is not done when it draws. Before review, it arrives with:

  1. a row in the widget specification, in the core-widgets.md format;
  2. a row of design-system metrics;
  3. a card in the showcase gallery, on the screen of the chapter that documents it, linking that section;
  4. semantics assertions, so the sweep finds a role and a name;
  5. golden images, in both themes and at both densities.

The gallery is the demo, the visual-regression corpus and the accessibility sweep at once, so a widget that is not in it has no visual or accessibility test. The gallery has a screen per chapter of this guide and a card per section, and GalleryDocsTest fails on a section with no card, a card with no link, or a link to a heading that does not exist. Writing a widget walks through the code. The sweeps that read the registry are in Tests and gates.

Decisions are recorded

A change that chooses between designs gets an architecture decision record beside the code, in the same pull request. The log is read on GitHub. Recording a decision says how to write one and what the build checks about it.

The chapters

Where to ask

Open an issue at https://github.com/DigitalSmile/goldberry/issues. A bug report is most useful with the platform, the display scale, and the start-up timeline the toolkit logs at TRACE. Logging and diagnostics says how to turn that on.

Status says what is built, and TODO says what is left out and why. A question that one of those answers is answered there first.