aceDuChene / check-mate

This is the check mate app.
GNU General Public License v3.0
0 stars 0 forks source link


checkmate
Check Mate

A simple and convenient checklist app.

Setup

Linter

Ktlint is used to check code formatting before making a commit.
Add the following code to a file titled pre-commit in <project-directory>/.git/hooks/:

#!/bin/sh

CHANGED_FILES="$(git --no-pager diff --name-status --no-color --cached | awk '$1 != "D" && $NF ~ /\.kts?$/ { print $NF }')"

if [ -z "$CHANGED_FILES" ]; then
echo "No Kotlin staged files."
exit 0
fi;

echo "Running ktlint over these files:"
echo "$CHANGED_FILES"

./gradlew ktlintCheck
gradle_command_exit_code=$?
exit $gradle_command_exit_code

Firestore Rules

Firebase CLI is used to update Firestore rules.

  1. Download and run Firebase CLI
  2. Login to Firebase using firebase login
    • If error occurs, try firebase login --reauth
  3. Verify Firebase projects using firebase projects:list
  4. Once logged in, Firestore rules can be modified in file titled firestore.rules
  5. Push new Firestore rules using firebase deploy

Code Style

View Model

Downloading APK From Github Repository

  1. Go to "Actions" tab on the Github Repository
  2. Choose "Build & Sign Release APK" from the workflows on the left
  3. Above the list of workflow runs, click the Run workflow button
  4. Once the workflow runs successfully, download "Build Artifacts" at the bottom of the page
  5. Unzip the "Build Artifacts" file to find the APK