Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/EN/Maintenance/DocumentationUpdate.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Docs updates & changes

## March 2026

- [Add CLI Build option](../SettingUpAaps/CLIBuild.md) @je-l
- Rename *Computer Build* to *Android Studio Build*. Preserve file names for URLs.

## January 2025

- [3.4](#version3400) release and documentation update roll-up (Wizard, Computer build versions, Config Builder)
Expand Down
4 changes: 2 additions & 2 deletions docs/EN/Maintenance/UpdateComputerBuild.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Update with a computer
# Update with Android Studio

## Build yourself instead of download

Expand All @@ -8,7 +8,7 @@
In case you want to build **AAPS** on a new computer : copy your back-up keystore file to the new computer. Then follow the [Initial build **AAPS** procedure](../SettingUpAaps/BuildingAaps.md) instead of this guide. With the only difference that instead of creating a new keystore, you can select the one you have copied on the new computer.
```

## Overview for updating to a new version of AAPS with a computer
## Overview for updating to a new version of AAPS with Android Studio

```{contents} Steps for updating to a new version of AAPS
:depth: 1
Expand Down
6 changes: 5 additions & 1 deletion docs/EN/Maintenance/UpdateToNewVersion.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@

If you already built your AAPS app with the Browser Build method, follow [these instructions](./UpdateBrowserBuild.md).

## Update AAPS with a computer
## Update AAPS with Android Studio

Follow [these instructions.](./UpdateComputerBuild.md).

## Update AAPS with the command-line

Use the [same instructions](../SettingUpAaps/CLIBuild.md) as when building AAPS previously, but pull new changes with git.

(Update-to-new-version-check-aaps-version-on-phone)=
### Check AAPS version on phone

Expand Down
16 changes: 12 additions & 4 deletions docs/EN/SettingUpAaps/BuildingAaps.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,27 @@ See [FAQ page](../UsefulLinks/FAQ.md) for details.

---

Two methods are available to build the AAPS app:
Three methods are available to build the AAPS app:

### Build with a browser
### Build with a browser (recommended)

You can build the app with your smartphone using GitHub actions, and save it in your Google Drive.

**[Follow these instructions.](./BrowserBuild.md)**

----

### Build with a computer
### Build with Android Studio

You can build the app with your computer using Android Studio.
You can build the app with your computer using Android Studio. This used to be the only build option,
nowadays Android Studio is mostly used by developers who consider making code changes.

**[Follow these instructions.](./ComputerBuild.md)**

----

### Build using the command-line

This option is intended for those who prefer to build AAPS in local command-line, without installing Android Studio.

**[Follow these instructions.](./CLIBuild.md)**
63 changes: 63 additions & 0 deletions docs/EN/SettingUpAaps/CLIBuild.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Build instructions for the command-line

```{admonition} For users familiar with the command-line and git
:class: information

The simplest option to build AAPS is the [Browser build](./BrowserBuild.md) alternative.
```

Tested with Fedora and Debian Linux, other systems should work with minimal adjustments.

## Requirements

Consult the minimum required Java version from [this table](#Building-APK-recommended-specification-of-computer-for-building-apk-file).
Install the appropriate OpenJDK package using the system package manager.
For example in Debian, the packages are named like `openjdk-21-jdk`. It should include `javac` and `keytool` binaries.

Download the *Android Command line tools* package from the [Android Studio page](https://developer.android.com/studio#command-line-tools-only).
Android Studio itself is not required.
More information about installing this package is found in [sdkmanager docs](https://developer.android.com/tools/sdkmanager).
After the package is installed, you should manually set two [environment variables](https://developer.android.com/tools/variables): `ANDROID_HOME` and `PATH`.
Finally, run `sdkmanager --licenses` to finish the installation.

## Building AAPS with Gradle wrapper

### 1. Generate a Java keystore file for signing AAPS

If you already have a keystore file for signing AAPS, reuse that.

```sh
keytool -genkeypair -v \
-keystore aaps-keystore.jks \
-alias aaps-key \
-keyalg RSA \
-keysize 4096 \
-validity 20000
```

You will need the keystore file and passphrase every time you update AAPS.

### 2. Compile the AAPS APK file

Clone the [git repo](https://github.com/nightscout/AndroidAPS) if not already cloned.
AAPS uses master branch for the latest stable version, ensure you are on the branch/tag you want to build.

Run `./gradlew :app:assembleFullRelease` in the repo. It automatically downloads Gradle, dependencies, and then compiles the code.
When the build succeeds, you should have an unsigned APK at `app/build/outputs/apk/full/release/app-full-release-unsigned.apk`.
It should have also installed an `apksigner` binary to `$ANDROID_HOME`. Update your `PATH` again.

### 3. Create a signed APK file from the unsigned one

<!-- Suggest building outside the git repo, to minimize risk of accidental APK commits -->

Change to your home directory and create a signed APK file:

```sh
apksigner sign \
--ks path/to/aaps-keystore.jks \
--ks-key-alias aaps-key \
--out app-full-release-signed.apk \
./AndroidAPS/app/build/outputs/apk/full/release/app-full-release-unsigned.apk
```

Now you have `app-full-release-signed.apk` ready for installation or upgrade.
4 changes: 3 additions & 1 deletion docs/EN/SettingUpAaps/ComputerBuild.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Computer Build
<!-- Android Studio Build, FKA Computer Build. Preserve filenames to avoid breaking URLs. -->

# Android Studio Build

This is the traditional method to build your AAPS app.

Expand Down
5 changes: 3 additions & 2 deletions docs/EN/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ Setting up the reporting server <./SettingUpAaps/SettingUpTheReportingServer.md>
- Tidepool <./SettingUpAaps/Tidepool.md>
Building AAPS <./SettingUpAaps/BuildingAaps.md>
- Browser Build <./SettingUpAaps/BrowserBuild.md>
- Computer Build <./SettingUpAaps/ComputerBuild.md>
- Android Studio Build <./SettingUpAaps/ComputerBuild.md>
- CLI Build <./SettingUpAaps/CLIBuild.md>
Transferring and Installing AAPS <./SettingUpAaps/TransferringAndInstallingAaps.md>
Setup Wizard <./SettingUpAaps/SetupWizard.md>
Your AAPS Profile <./SettingUpAaps/YourAapsProfile.md>
Expand Down Expand Up @@ -151,7 +152,7 @@ AAPS Release Notes <./Maintenance/ReleaseNotes.md>
Documentation updates <./Maintenance/DocumentationUpdate.md>
Updating to a new version of AAPS <./Maintenance/UpdateToNewVersion.md>
- Browser Update <./Maintenance/UpdateBrowserBuild.md>
- Computer Update <./Maintenance/UpdateComputerBuild.md>
- Android Studio Update <./Maintenance/UpdateComputerBuild.md>

```

Expand Down
Loading