Since this project is still in development, the details of the contribution guidelines are subject to change.
To see Chinese version, see 贡献指南
- Download and install Flutter.
- Clone the repository,or fork it.
- Create a new branch from
main
. - Run
flutter pub get
to install dependencies. - Run
dart run husky install
to install husky hooks to makelint_staged
work properly.
For security reasons, the project stores some sensitive information in the .env
file, which will
not be uploaded to the repository.
You need to create .env
file in the root directory of the project, and fill the data below:
BANGUMI_APP_ID=xxx
BANGUMI_APP_SECRET=xxx
You can get the BANGUMI_APP_ID
and BANGUMI_APP_SECRET
from Bangumi API
by creating a new app.
After you have created the .env
file, you could run the project by using the following command:
flutter run
Prefer to use Android Studio with dart and flutter plugins.
When you make changes to the project,
you could create a pull request to the main
branch of this repository.
If the changes involve data models, please submit the files generated by build_runner
.
The project uses lint_staged
, flutter_lints
, import_sorter
and other tools to check the code
style.
It is recommended to check the code style after changing the file:
- Check if there are any warnings in
dart analyze
, and resolve them if there are any. - Run
dart run import_sorter:main
to sort the imports. lint_staged
will automatically check the code style when submitting code. If it does not meet the requirements, the code will not be submitted.
Note that due to the serious problem of lint_staged
used in the project, when too many files are
submitted at once, multiple processes will be started, which will seriously occupy the CPU and
memory, causing the computer to freeze.
For more information on the above,see issue
Therefore, if the number of files involved in the changes exceeds 10, please submit 10 files first,
and then submit the remaining files by amend
, and the number of files submitted at one time does
not exceed 10.
The project does not have strict requirements for commit messages, but it is recommended to use Gitmoji to make the commit messages more readable.
You can use it in Android Studio by installing the plugin.
If you have any questions or suggestions,you could start a new issue by ISSUE_TEMPLATE.
Before you start a new issue, please check if the issue has already been reported.