Thanks for your help! We currently review PRs for the packages/, docs/, and apps/ directories, as well as markdown files.
We recommend that anyone interested in contributing to this library use the sample app located in apps/storage-sample as part of their development workflow when introducing or testing changes. Please follow the sample app setup guide for detailed instructions.
If this is your first time committing to a large public repo, you might find this tutorial helpful: How to Write a Git Commit Message
To increase the chances of your changes being merged, ensure you build good tests for them. Each module in packages/ has unit tests located in the respective test/ directory under that module. Make sure your changes are covered by these unit tests to help maintain the stability of Android OMH Storage for everyone.
You can run all the tests with the following command:
./gradlew testIt's essential to check for linting issues before submitting your PR. You can run the following command to ensure your code adheres to the project's style guidelines:
./gradlew detektEnsure your changes compile correctly by assembling the project. You can do this with the following command:
./gradlew assembleThis project maintains documentation across several important areas:
- Project Overview - /README.md
- Getting Started - /docs/markdown/getting-started.md
- Core Plugin - /packages/core/README.md
- Google Drive Plugin - /packages/plugin-googledrive-gms/README.md
- OneDrive Plugin - /packages/plugin-onedrive/README.md
- Dropbox Plugin - /packages/plugin-dropbox/README.md
- Contributing Guidelines - /CONTRIBUTING.md
- Sample App Setup - /apps/storage-sample/README.md
- License - /LICENSE.md
You can build the documentation locally with the following command:
./gradlew buildDocsThis command performs the following Gradle tasks:
-
dokkaHtmlMultiModule- Generates HTML API documentation for all modules. Outputs are written to /docs/generated/. -
copyMarkdownDocs- Copies and sanitizes markdown files from packages/<name>/docs/ to be processed by Jekyll in /docs/markdown/.
To locally serve the entire project documentation, ensure Ruby 3.1.6 is installed on your machine. Run a local Jekyll server by executing bundle exec jekyll serve inside /docs/markdown. Note that each time you modify documentation in any package, you will have to run the copyMarkdownDocs Gradle task to update Jekyll with the new markdown files.
To view the generated API documentation locally, serve the directory /docs/generated/ using a local server of your choice (e.g., python3 -m http.server).
To create a new plugin for a storage provider, follow these steps:
Add the dependency for the Core package to your plugin's build.gradle file:
dependencies {
implementation("com.openmobilehub.android.storage:core:2.0.0")
}To implement the OmhStorageClient class, you will need to provide implementations for various functionalities specific to your storage provider. Use the existing plugins as references to guide you in developing your own plugin.
Here are some examples to help structure your implementation and integrate with different storage providers:
By examining these examples, you can better understand the best practices and necessary components for creating a robust plugin tailored to your storage provider.