- Contributing
- Pull Requests
- Conventional Commits
- Semantic Versioning
- Architecture Guidelines
- Release Process
I'd love to have your help, but please don't skimp on greatness!
Please check the Issues to make sure what you want is not already being worked on.
- Please create an issue
- Please tag the issue with the appropriate labels as well (i.e. status, bug, TODO, etc.)
- Each issue should have clear details (i.e. steps to reproduce if it's a bug or acceptance criteria if a new feature)
For merging and pull request:
- PRs will be squashed and merged after a rebase
- The commit should have the issue-# in its message
- Signed commits are required
- The branch must be up-to-date before merging
- Conventional commits should be used to denote and differentiate between breaking changes, fixes, chores/tasks, and new features
Some helpful tips to make PRs go smoother:
- Please branch off develop to do any new work
- Branches should be prefixed with issue-#/ and a short description, example: issue-53/adding-some-feature
- Please make sure all static code analysis checks pass
- Please write tests
- Please make sure current tests pass
- Please help maintain the KDocs and write new ones
- Please help maintain the markdown docs (if necessary)
- Once satisfied with your work, please submit a Pull Request and I'll be happy to review it! All PRs need to be reviewed by a code owner.
This project strives to follow conventional commits where there is a specified format to help standardize commit messages. This is enforced via the commit-msg Git Hook. More on Git Hooks here.
The basic format of a commit message is: (type)(optional scope)(breaking change indicator if needed): issue# - description
Examples:
feat(addnetowrk): issue25 - Add network connection wizard
fix(core, removenetwork): issue54 - Foobared
feat(wisefy)!: issue999 - Breaking change of doom
feat
- A new feature
fix
- A bug fix
ci
- Changes to CI configuration files and scripts
chore
- Changes that don't modify src or test files
docs
- Documentation only changes
test
- Modifies code for tests without touching production code
style
- Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
refactor
- A code change that neither fixes a bug nor adds a feature
revert
- Reverts a previous commit
perf
- A code change that improves performance
release
- A commit specific to the release process
Note Adding !
before the :
is meant to denote a breaking change
Each artifact follows semantic versioning with a major, minor, and patch version.
The BuildVersions file contains the version of each artifact within Wisefy.
Some architecture/code guidelines:
- Follow the patterns and naming conventions present to ensure consistency
- The query class is prefixed with function name (f.e. the function
getCurrentNetwork
uses the query classGetCurrentNetworkQuery
) - The request class is prefixed with function name (f.e. the function
addNetwork
uses the request classAddNetworkRequest
) - The result class is prefixed with function name (f.e. the function
removeNetwork
uses the result classRemoveNetworkResult
) - The
ktx
extension functions have the suffixAsync
(f.e. the extension forgetNetworkConnectionStatus
isgetNetworkConnectionStatusAsync
) - Keep in-mind the folder and organization structure defined in the README.md
- The query class is prefixed with function name (f.e. the function
- Synchronous, async, and ktx options are supported for each feature (unless there is an exceptional case)
- Adapters are the only expected location for assertions
- For
ktx
extension functions, the library deliberately catches any exception and throws a WisefyException - Async operations use coroutines internally and:
- Execute on the background thread
- Return results to the main thread
- Are locked with a mutex if there are potential conflicts with out async functions (f.e. enableWifi, disableWifi, and isWifiEnabled)
This requires the keystore and GPG signing to be present locally on the machine so typically I am the only one following this process. Documentation never hurt and future me may be thankful :P
- Create a working branch off of develop
- The branch should be named
release/wisefy<artifact>/#
. For example, releasingwisefy:addnetwork
5.1.0 would look like:release/wisefy-addnetwork/5.1.0
and releasingwisefy
5.1.0 would look like:release/wisefy/5.1.0
.
- The branch should be named
- Bump the version for the artifact within the BuildVersions
- Publish the artifact locally
- Run
./gradlew wisefy:<artifact>:clean
- Run
./gradlew wisefy:<artifact>:publishReleasePublicationToMavenLocal
- Run
- Publish
wisefy
locally so the gradlew.lockfile file can be updated forwisefy:ktx
with the new version- Run
./gradlew wisefy:clean
- Run
./gradlew wisefy:publishReleasePublicationToMavenLocal
- Run
- Publish
wisefy:ktx
locally so the gradlew.lockfile file can be updated forapp
with the new version- Run
./gradlew wisefy:ktx:clean
- Run
./gradlew wisefy:ktx:publishReleasePublicationToMavenLocal
- Run
- Update the gradle.lockfile files for wisefy, wisefy:ktx, and the sample app
- Run
./gradlew wisefy:depedencies --write-locks
- Run
./gradlew wisefy:ktx:depedencies --write-locks
- Run
./gradlew app:depedencies --write-locks
- Run
- Regenerate the markdown documentation
- Run
./gradlew dokkaGfmMultiModule
- Run
- Run the sample app and ensure everything is working as expected
- Create a commit
release(wisefy:<artifact>): Release wisefy:<artifact> <version number>
with the changes from steps 2-7 - Update the CHANGELOG.md
- Run
scripts/updateChangelog.sh
- Commit the update to the CHANGELOG.md
- Run
- Open up a PR of the release branch into
develop
- Wait for CI to pass and then squash and merge the the PR into develop. The result should be a single release commit (
release(wisefy:<artifact>): Release wisefy:<artifact> <version number>
) - Create a release in the GitHub UI pointing to the release commit in develop
- The title should be
wisefy:<artifact>-5.0.0
- The tag should also then be created as
wisefy:<artifact>:5.0.0
- The title should be
- Change over locally to the newly created tag
- Publish the artifact to MavenCentral
- Run
/gradlew wisefy:<artifact>:publishReleasePublicationToReleaseRepository
- Run
- Reach out to me by opening a GitHub issue in the repository or via email ([email protected]) and I'll log on and complete the release to MavenCentral
- Profit
- Artifact hierarchy for releasing:
wisefy:core
wisefy:<artifact>
(all other artifacts excludingcore
andktx
wisefy
wisefy:ktx