Clone the repository:
$ git clone https://github.com/bitwarden/android
Create a user.properties
file in the root directory of the project and add the following properties:
gitHubToken
: A "classic" Github Personal Access Token (PAT) with the read:packages
scope (ex: gitHubToken=gph_xx...xx
). These can be generated by going to the Github tokens page. See the Github Packages user documentation concerning authentication for more details.localSdk
: A boolean value to determine if the SDK should be loaded from the local maven artifactory (ex: localSdk=true
). This is particularly useful when developing new SDK capabilities. Review Linking SDK to clients for more details.Setup the code style formatter:
All code must follow the guidelines described in the Code Style Guidelines document. To aid in adhering to these rules, all contributors should apply docs/bitwarden-style.xml
as their code style scheme. In IntelliJ / Android Studio:
Preferences > Editor > Code Style
.Manage
button next to Scheme
.Import
.bitwarden-style.xml
file in the project's docs/
directory.BitwardenStyle
"to" BitwardenStyle
.Apply
and OK
to save the changes and exit Preferences.Note that in some cases you may need to restart Android Studio for the changes to take effect.
All code should be formatted before submitting a pull request. This can be done manually but it can also be helpful to create a macro with a custom keyboard binding to auto-format when saving. In Android Studio on OS X:
Edit > Macros > Start Macro Recording
Code > Optimize Imports
Code > Reformat Code
File > Save All
Edit > Macros > Stop Macro Recording
This can then be mapped to a set of keys by navigating to Android Studio > Preferences
and editing the macro under Keymap
(ex : shift + command + s).
Please avoid mixing formatting and logical changes in the same commit/PR. When possible, fix any large formatting issues in a separate PR before opening one to make logical changes to the same code. This helps others focus on the meaningful code changes when reviewing the code.
Setup JDK Version
17
:
Preferences > Build, Execution, Deployment > Build Tools > Gradle
.Gradle JDK:
.17.x
version or hit Download JDK...
if not present.Version
17
.Vendor
.Download
.Apply
.Setup detekt
pre-commit hook (optional):
Run the following script from the root of the repository to install the hook. This will overwrite any existing pre-commit hook if present.
echo "Writing detekt pre-commit hook..." cat << 'EOL' > .git/hooks/pre-commit #!/usr/bin/env bash echo "Running detekt check..." OUTPUT="/tmp/detekt-$(date +%s)" ./gradlew -Pprecommit=true detekt > $OUTPUT EXIT_CODE=$? if [ $EXIT_CODE -ne 0 ]; then cat $OUTPUT rm $OUTPUT echo "***********************************************" echo " detekt failed " echo " Please fix the above issues before committing " echo "***********************************************" exit $EXIT_CODE fi rm $OUTPUT EOL echo "detekt pre-commit hook written to .git/hooks/pre-commit" echo "Making the hook executable" chmod +x .git/hooks/pre-commit echo "detekt pre-commit hook installed successfully to .git/hooks/pre-commit"Theme Icons & Illustrations
The app supports light mode, dark mode and dynamic colors. Most icons in the app will display correctly using tinting but multi-tonal icons and illustrations require extra processing in order to be displayed properly with dynamic colors.
All illustrations and multi-tonal icons require the svg paths to be tagged with the name
attribute in order for each individual path to be tinted the appropriate color. Any untagged path will not be tinted and the resulting image will be incorrect.
The supported tags are as follows:
The following is a list of all third-party dependencies included as part of the application beyond the standard Android SDK.
AndroidX Activity
AndroidX Appcompat
AndroidX Autofill
AndroidX Biometrics
AndroidX Browser
AndroidX Camera
AndroidX Compose
AndroidX Core
AndroidX Credentials
AndroidX Lifecycle
AndroidX Navigation
AndroidX Room
AndroidX Security
AndroidX WorkManager
Dagger Hilt
Glide
kotlinx.collections.immutable
kotlinx.coroutines
kotlinx.serialization
OkHttp 3
Retrofit 2
Timber
ZXing
The following is an additional list of third-party dependencies that are only included in the non-F-Droid build variants of the application.
Firebase Cloud Messaging
Firebase Crashlytics
Google Play Reviews
The following is a list of additional third-party dependencies used as part of the local development environment. This includes test-related artifacts as well as tools related to code quality and linting. These are not present in the final packaged application.
detekt
JUnit 5
MockK
Robolectric
Turbine
The following is a list of additional third-party dependencies used as part of the CI/CD workflows. These are not present in the final packaged application.
Fastlane
Kover
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4