Crux is a modern, robust library for parsing HTML articles. With all the content on the Web out there, there is always lots of room for improvement. We will gladly accept your pull requests that make parsing more accurate, or add new features & metadata detection.
To maintain the integrity of the library, we have a few simple expectations from all code submitted.
-
Crux follows the Google Java Style Guide. All new code must adhere to this guide. Please note rules around indentation (2 spaces, no tabs) and that braces are required around single-line clauses, e.g.:
if (condition) { x = 0; // Braces are required around this line. }
-
Crux is fully unit-tested, and we want to keep it that way. All new code should include unit tests.
-
For parsing improvements, Crux’s rich suite of integration tests should be updated to reflect the parsing changes. Authors may either choose to test their improvements within existing HTML test files, or add new ones, as appropriate.
-
All current tests should continue to pass. Either update the tests in the same CL, or modify the new code, so that existing tests continue to pass.
-
Changes should be self-contained, as far as possible. When implementing multiple independent improvements, each one should be in its own pull request.
- Update
version
inbuild.gradle
. - Create a separate commit for the version number change, naming it
Bump version to x.y.z
. - Push all pending commits to GitHub.
- Wait for CI to confirm green status.
- Tag that commit as a release at https://github.com/chimbori/crux/releases .
- Run
./gradlew uploadArchives
; confirm thatuploadArchives
task completes successfully. If theossrhUsername
property cannot be found, then uploading will not be performed. - Go to https://oss.sonatype.org/#stagingRepositories, login as
chimbori
. - Select the
comchimboricrux-xxxx
repo, then click onClose
from the top toolbar. - Wait for the
Close
step to complete, then click onRelease
from the top toolbar.
- Install GPG, e.g.
brew install gpg
on macOS. - Locate stored credentials from private storage.
- Run
restore-keys.sh
from the stored credentials directory. - Enter the password for
chimbori
when prompted. This password is different from the Sonatype/Nexus password. - Rename
gradle.properties-sample
togradle.properties
in that same directory, and fill in missing redacted credentials. gradle.properties
is configured to be.gitignore
d, but make sure it is never pushed to a public repo.- The new machine is now ready and configured for pushing to Maven Central.