Skip to content

Latest commit

 

History

History
49 lines (31 loc) · 3.88 KB

DEVELOPMENT.md

File metadata and controls

49 lines (31 loc) · 3.88 KB

Developing Unlauncher

Kotlin Linting/Formatting

This project uses ktlint to format/lint the Kotlin code to ensure consistency of style across the codebase.

Developers using Android Studio are encouraged to install the Ktlint plugin for a tighter feedback loop and more automation.

Adding a new configuration preference

Currently user preferences in the Unlauncher code base are stored in one of three different ways:

  1. In the SharedPreferences. This is an older style of storing basic preferences that was inherited from Slim Launcher.
  2. In an SQLite database. This format is more appropriate for storing large amounts of data and was inherited from Slim Launcher as the method for storing data about the apps installed on the device.
  3. In a Proto DataStore. This data format is suitable for both simple user preference values as well as storing larger data sets.

The plan is to eventually migrate away from SharedPreferences and SQLite so that all the data is centralized in Proto DataStores. This will maximize consistency and simplicity in the codebase. All new data values should be added to Proto DataStores.

Building a release

Building an Unlauncher release is straightforward.

  1. Push a tag to GitHub (e.g. 1.2.1) from the latest commit on the master branch
    1. Make sure that the versionName in the build.gradle.kts matches the tag that you are pushing
  2. Add release notes to the draft Release on GitHub that was created by the CI and publish the release
  3. Prepare for the next release by incrementing the versionCode and versionName in the build.gradle.kts file
  4. Monitor the F-Droid build status to make sure the tag is successfully published (can take several days depending on the build queue)

Building a beta release

A beta release should be published ahead of an official release any time there are major changes to the app or the build process.

Unfortunately, F-Droid does not have an automatic process for triggering "beta" releases like it does for normal automatic updates yet. However, an F-Droid user will only be prompted to upgrade an app (or have the app be auto-upgraded) if their locally installed app has a version/code that is less than the CurrenVersion/CurrentVersionCode defined in the fdroiddata yml config file.

So, creating a beta release for Unlauncher requires the following steps:

  1. Push a beta tag to GitHub (e.g. 2.0.0-beta.1)
    1. Make sure that the versionName in the build.gradle.kts matches the tag that you are pushing
  2. Add release notes to the draft Release on GitHub that was created by the CI and publish it as a pre-release
  3. Raise a MR to fdroid/fdroiddata to add a new Builds entry for the beta release
    1. Do not update the configured CurrenVersion/CurrentVersionCode since that will trigger a normal release
  4. Prepare for the next release by incrementing the versionCode and versionName in the build.gradle.kts file

Checking F-Droid build status

The status for the latest Unlauncher F-Droid build can be found here.

A list of all recent F-Droid builds can be found here.