This page contains all the necessary information for building Husky yourself.
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.
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
.
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.
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.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.
beta
releasesTo assemble a beta
APK:
$ ./gradlew assembleHuskyBetaRelease --rerun-tasks
The release APK will be called husky_<version>-beta<beta_number>.apk
.
stable
releasesTo assemble a stable
APK:
$ ./gradlew assembleHuskyStableRelease --rerun-tasks
The release APK will be called husky_<version>.apk
.
dev
releasesTo assemble a dev
APK:
$ ./gradlew assembleHuskyDevRelease --rerun-tasks
The release APK will be called husky_<version>.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
).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:
android
.androiddebugkey
.android
.The information is at the Dependencies.kt#L34-40.
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.
commit bcc6454bc52bb747c5c6076b31ff61065576f2fe Author: Adolfo Santiago <epoch@nixnetmail.com> Date: 2022-04-30T09:20:54+02:00 Update contributing doc.