~captainepoch/husky-man

This page contains all the necessary information for building Husky yourself.

#Read before continuing with the guide

As I mentioned a lot of times the application will suffer a refactor. Therefore, tests are going to fail and will be done again soon(TM).

Please, do not use the build Gradle task because it will fail.

#Android SDK

You will need to setup the Android SDK before compiling this.

Bear in mind that you will need the build-tools version 32.0.0.

#Flavors

#Release flavors

There are two release flavors:

  • huskyBeta: flavor for beta releases.
  • huskyStable: flavor for stable releases.

The old naming of the flavors did not make any sense, so I changed it.

All the builds will generate unsigned APKs. You must sign the generated APK before installing it in any phone.

#Development flavors

There are two development flavors:

  • huskyDev: this flavor is for development purposes, i. e. testing a Room schema upgrade.
  • huskyNewhusky: this flavor is for the Husky 2.0.0 development. For now this will not accept any contributions and it will be not releases from here.

#Structure of the project

The project now resides in its own folder. Please change your CI/CD script/recipe/configuration to navigate inside the husky folder before executing any gradle task.

The following commands will build Husky for release. If you want to build Husky for debug, you must change Release for Debug at the end of the Gradle task. This is case sensitive.

#Assembling beta releases

To assemble a beta APK:

$ ./gradlew assembleHuskyBetaRelease --rerun-tasks

The release APK will be called husky_<version>-beta<beta_number>.apk.

#Assembling stable releases

To assemble a stable APK:

$ ./gradlew assembleHuskyStableRelease --rerun-tasks

The release APK will be called husky_<version>.apk.

#Assembling dev releases

To assemble a dev APK:

$ ./gradlew assembleHuskyDevRelease --rerun-tasks

The release APK will be called husky_<version>.apk.

#Signing the APK

Put in the $PATH variable the build-tools folder.

$ apksigner sign --ks <KEYSTORE> --ks-key-alias <ALIAS> --ks-pass <KEYSTORE_PASS> --key-pass <KEY_PASS> --in <UNSIGNED_APK> --out <SIGNED_APK>

Where:

  • <KEYSTORE>: Name of the keystore (i.e.: android.keystore).
  • <ALIAS>: Alias of the key (i.e.: androiddebugkey).
  • <KEYSTORE_PASS>: Password of the keystore (i.e.: "pass:android"). Change what is before the : symbol.
  • <KEY_PASS>: Password of the key (i.e.: "pass:android"). Change what is before the : symbol.
  • <UNSIGNED_APK>: The APK you want to sign. I recommend to execute a find command to look for the APK file (i.e.: $(find -name "*-unsigned.apk")).
  • <SIGNED_APK>: The name of the APK signed (i.e.: husky-beta.apk).
#Debug signing

The project is setup to sign debug builds (those you generate pressing the Play button at Android Studio) with a debug key, therefore you can work from any computer because the APK installed in your phone will have the same signature.

Information about the keystore:

  • Keystore password: android.
  • Key alias password: androiddebugkey.
  • Key password: android.

The information is at the Dependencies.kt#L34-40.

#Sourcehut pipeline

The repository contains the build manifest to compile the stable and the beta (WIP) flavor.

If you are an user of Sourcehut, feel free to modify the manifest to suit your needs for compiling the application.

About this wiki

commit bcc6454bc52bb747c5c6076b31ff61065576f2fe
Author: Adolfo Santiago <epoch@nixnetmail.com>
Date:   2022-04-30T09:20:54+02:00

Update contributing doc.
Clone this wiki
https://git.sr.ht/~captainepoch/husky-man (read-only)
git@git.sr.ht:~captainepoch/husky-man (read/write)