-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,29 @@ | ||
# Contributing to Finamp | ||
|
||
Thanks for your interest in contrtributing to Finamp! This document goes over how to get started on Finamp development, and other ways to contribute. | ||
|
||
## Setting up a Development Environment | ||
|
||
Finamp is a fairly standard Flutter app, so all you have to do is [install Flutter](https://docs.flutter.dev/get-started/install). Once Flutter is installed, you should be able to run Finamp on emulators/real devices. | ||
|
||
### Android Keys | ||
|
||
To build release APKs, you need to set up a signing key for Android. To get that set up, follow [this guide](https://docs.flutter.dev/deployment/android#signing-the-app) from the Flutter documentation. Note that if you have Finamp installed already, your phone may panic because the key is different. | ||
|
||
### The Arcane Arts (Code Generation) | ||
|
||
![A conversation between me and Chaphasilor. I say "did you try running (the Dart build command)?" They reply "I wasn't aware I need to use the arcane arts for this"](assets/arcane-arts.png) | ||
|
||
Because Dart doesn't support macros and stuff, a few dependencies rely on code generation which must be run manually. These dependencies are: | ||
|
||
* Hive - the database that Finamp uses for storing all data | ||
* `json_serializable` - For deserialising JSON into classes | ||
|
||
To rebuild these files, run `dart run build_runner build --delete-conflicting-outputs`. This must be done when: | ||
|
||
* Modifying a class that is returned by Jellyfin (such as the classes in `lib/models/jellyfin_models.dart`) | ||
* Adding fields to a database class (annotated with `@HiveType`) | ||
|
||
### Hive | ||
|
||
As said earlier, Finamp uses Hive for all data storage needs. If you're doing work that involves data storage, I recommend you read [the Hive docs](https://docs.hivedb.dev/#/). Please ensure that your changes work when upgrading Finamp from the current release to your changes, as not handling upgrades will cause the app to crash. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.