Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: iSoron/uhabits
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.2.0
Choose a base ref
...
head repository: iSoron/uhabits
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dev
Choose a head ref
Loading
Showing 331 changed files with 11,076 additions and 15,670 deletions.
11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ jobs:

- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build
path: |
24 changes: 12 additions & 12 deletions NOTICE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright Notices

### ActiveAndroid
## ActiveAndroid

<https://github.com/pardom/ActiveAndroid>

@@ -18,7 +18,7 @@
See the License for the specific language governing permissions and
limitations under the License.

### Android Open Source Project
## Android Open Source Project

<https://source.android.com/>

@@ -36,7 +36,7 @@
See the License for the specific language governing permissions and
limitations under the License.

### FontAwesome
## FontAwesome

<http://fontawesome.io>

@@ -59,15 +59,15 @@ under the SIL OFL 1.1.
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

### Material Design Icons
## Material Design Icons

<https://github.com/google/material-design-icons>

Material design icons are the official icon set from Google that are designed
under the material design guidelines. Available under the Creative Common
Attribution 4.0 International License (CC-BY 4.0).

### Android Flow Layout
## Android Flow Layout

<https://github.com/ApmeM/android-flowlayout>

@@ -87,7 +87,7 @@ Extended linear layout that wrap its content when there is no place in the curre
License for the specific language governing permissions and limitations
under the License.

### Dagger 2
## Dagger 2

<https://github.com/google/dagger>

@@ -108,7 +108,7 @@ A fast dependency injector for Android and Java.
See the License for the specific language governing permissions and
limitations under the License.

### AutoFactory
## AutoFactory

<https://github.com/google/auto/tree/master/factory>

@@ -128,7 +128,7 @@ A source code generator for JSR-330-compatible factories.
See the License for the specific language governing permissions and
limitations under the License.

### Retrolambda
## Retrolambda

<https://github.com/orfjackal/retrolambda>

@@ -138,7 +138,7 @@ Backport of Java 8's lambda expressions to Java 7, 6 and 5
This software is released under the Apache License 2.0.
The license text is at http://www.apache.org/licenses/LICENSE-2.0

### PebbleKit SDK
## PebbleKit SDK

<https://github.com/pebble/pebble-android-sdk/>

@@ -147,7 +147,7 @@ Android PebbleKit SDK to talk to the Pebble via Bluetooth
The MIT License (MIT)
Copyright (c) 2014 - 2015 Pebble Technology

### AppIntro
## AppIntro

<https://github.com/PaoloRotolo/AppIntro>

@@ -168,7 +168,7 @@ Make a cool intro for your Android app.
See the License for the specific language governing permissions and
limitations under the License.

### ButterKnife
## ButterKnife

<https://github.com/JakeWharton/butterknife>

@@ -188,7 +188,7 @@ Bind Android views and callbacks to fields and methods
See the License for the specific language governing permissions and
limitations under the License.

### opencsv
## opencsv

<http://opencsv.sourceforge.net/>

35 changes: 13 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<h1 align="center">Loop Habit Tracker</h1>
<p align="center">
<a href="https://github.com/iSoron/uhabits/actions?query=workflow%3A%22Build+%26+Test%22">
<img src="https://github.com/iSoron/uhabits/workflows/Build%20&%20Test/badge.svg" />
<img alt="Build & Test" src="https://github.com/iSoron/uhabits/workflows/Build%20&%20Test/badge.svg" />
</a>
<a href="https://github.com/iSoron/uhabits/releases/latest">
<img src="https://img.shields.io/github/v/release/iSoron/uhabits" />
<img alt="release" src="https://img.shields.io/github/v/release/iSoron/uhabits" />
</a>
<a href="https://github.com/iSoron/uhabits/discussions">
<img src="https://img.shields.io/badge/GitHub-Discussions-%23fc4ebc" />
<img alt="GitHub" src="https://img.shields.io/badge/GitHub-Discussions-%23fc4ebc" />
</a>
</p>

@@ -32,32 +32,23 @@ source.

## Features

* <b>Beautiful, minimalistic and lightweight interface.</b>
Loop has an elegant and minimalistic interface that is very easy to use, even for first-time users. Highly optimized for speed, the app works well even on older phones.
* **Beautiful, minimalistic and lightweight interface.** Loop has an elegant and minimalistic interface that is very easy to use, even for first-time users. Highly optimized for speed, the app works well even on older phones.

* <b>Habit score.</b>
Loop has an advanced formula for calculating the strength of your habits. Every repetition makes your habit stronger and every missed day makes it weaker. A few missed days after a long streak, however, will not completely destroy your progress, unlike many other don't-break-the-chain apps.
* **Habit score.** Loop has an advanced formula for calculating the strength of your habits. Every repetition makes your habit stronger and every missed day makes it weaker. A few missed days after a long streak, however, will not completely destroy your progress, unlike many other don't-break-the-chain apps.

* <b>Flexible schedules.</b>
In addition to daily habits, Loop supports habits with more complex schedules, such as 3 times per week or every other day.
* **Flexible schedules.** In addition to daily habits, Loop supports habits with more complex schedules, such as 3 times per week or every other day.

* <b>Reminders.</b>
Schedule notifications to remind you of your habits. Each habit can have its own reminder, at a chosen time of the day. Easily check or dismiss your habit directly from the notification.
* **Reminders.** Schedule notifications to remind you of your habits. Each habit can have its own reminder, at a chosen time of the day. Easily check or dismiss your habit directly from the notification.

* <b>Widgets.</b>
Be reminded of your habits whenever you unlock your phone. Colorful widgets allow you to track your habits directly from your home screen, without even opening the app.
* **Widgets.** Be reminded of your habits whenever you unlock your phone. Colorful widgets allow you to track your habits directly from your home screen, without even opening the app.

* <b>Take control of your data.</b>
If you want to further analyze your data, or move it to another service, Loop allows you to export it to spreadsheets (CSV) or to a database file (SQLite). For power users, checkmarks can be added through other apps, such as Tasker.
* **Take control of your data.** If you want to further analyze your data, or move it to another service, Loop allows you to export it to spreadsheets (CSV) or to a database file (SQLite). For power users, checkmarks can be added through other apps, such as Tasker.

* <b>No limitations.</b>
Track as many habits as you wish. Loop imposes no artificial limits on how many habits you can have. All features are available to all users. There are no in-app purchases.
* **No limitations.** Track as many habits as you wish. Loop imposes no artificial limits on how many habits you can have. All features are available to all users. There are no in-app purchases.

* <b>Completely ad-free and open source.</b>
There are no advertisements, annoying notifications or intrusive permissions in this app, and there will never be. The app is completely open-source (GPLv3).
* **Completely ad-free and open source.** There are no advertisements, annoying notifications or intrusive permissions in this app, and there will never be. The app is completely open-source (GPLv3).

* <b>Works offline and respects your privacy.</b>
Loop doesn't require an Internet connection or online account registration. Your confidential data is never sent to anyone. Neither the developers nor any third-parties have access to it.
* **Works offline and respects your privacy.** Loop doesn't require an Internet connection or online account registration. Your confidential data is never sent to anyone. Neither the developers nor any third-parties have access to it.

## Installing

@@ -94,7 +85,7 @@ contribute, even if you are not a software developer.

## License

<img align="right" src="https://www.gnu.org/graphics/gplv3-88x31.png">
<img align="right" alt="GPL v3" src="https://www.gnu.org/graphics/gplv3-88x31.png">

Copyright (C) 2016-2021 Álinson Santos Xavier <isoron@gmail.com>

23 changes: 6 additions & 17 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
plugins {
val kotlinVersion = "1.9.21"
id("com.android.application") version "8.1.4" apply (false)
id("org.jetbrains.kotlin.android") version kotlinVersion apply (false)
id("org.jetbrains.kotlin.kapt") version kotlinVersion apply (false)
id("org.jetbrains.kotlin.multiplatform") version kotlinVersion apply (false)
id("org.jlleitschuh.gradle.ktlint") version "11.6.1"
alias(libs.plugins.agp) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.ktlint.plugin) apply false
alias(libs.plugins.shadow) apply false
}

apply {
from("translators.gradle.kts")
}

allprojects {
repositories {
google()
mavenCentral()
maven(url = "https://plugins.gradle.org/m2/")
maven(url = "https://oss.sonatype.org/content/repositories/snapshots/")
maven(url = "https://jitpack.io")
}
from("gradle/translators.gradle.kts")
}
9 changes: 8 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ ADB="${ANDROID_HOME}/platform-tools/adb"
ANDROID_OUTPUTS_DIR="uhabits-android/build/outputs"
AVDMANAGER="${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager"
AVD_PREFIX="uhabitsTest"
EMULATOR="${ANDROID_HOME}/tools/emulator"
EMULATOR="${ANDROID_HOME}/emulator/emulator"
GRADLE="./gradlew --stacktrace --quiet"
PACKAGE_NAME=org.isoron.uhabits
SDKMANAGER="${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager"
@@ -38,6 +38,11 @@ if [ ! -f "${ANDROID_HOME}/platform-tools/adb" ]; then
exit 1
fi

if [ ! -f "$EMULATOR" ]; then
echo "Error: Not found: $EMULATOR"
exit 1
fi

# Logging
# -----------------------------------------------------------------------------

@@ -64,6 +69,7 @@ fail() {
core_build() {
log_info "Building uhabits-core..."
$GRADLE ktlintCheck || fail
$GRADLE lintDebug || fail
$GRADLE :uhabits-core:build || fail
}

@@ -216,6 +222,7 @@ android_test_parallel() {
for API in $*; do
(
LOG=build/android-test-$API.log
mkdir -p build
log_info "API $API: Running tests..."
android_test $API 1>$LOG 2>&1
ret_code=$?
24 changes: 11 additions & 13 deletions docs/BUILD.md
Original file line number Diff line number Diff line change
@@ -9,25 +9,25 @@ This pages describes how to download and build the app from the source code. If

## Build using Android Studio

**Step 1: Install git**
### Step 1: Install git

The package `git` is required for downloading the source code of the app and submitting changes GitHub. Please see [the git book](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) for further instructions. If you are planning to submit pull requests in the future, it is recommended to [generate and configure your SSH keys](https://help.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent).

**Step 2: Download and install Android Studio**
### Step 2: Download and install Android Studio

Although Android Studio can be downloaded [from their official website](https://developer.android.com/studio/), a much better option is to install it through [JetBrains Toolbox](https://www.jetbrains.com/toolbox-app/). This tool, developed by the same developers of Android Studio, allows you to easily upgrade and downgrade the IDE, or switch between stable, beta and canary versions. After downloading and installing JetBrains Toolbox, simply click the install button near Android Studio to install the newest stable version of IDE. Beta and canary versions have not been tested and may not work correctly.

After installation, launch Android Studio. If this is the first time you launch it, you will need to go through a wizard to setup the IDE. The default options should work fine. The wizard will download all additional components necessary for development, including the emulator, so it may take a while.

**Step 3: Download the source code**
### Step 3: Download the source code

To create a complete copy of the source code repository, open the terminal (Linux/macOS) or Git Bash (Windows), navigate to the desired folder, then run:
```bash
git clone https://github.com/iSoron/uhabits.git
```
The repository will be downloaded to the directory `uhabits`.

**Step 4: Open and run the project on Android Studio**
### Step 4: Open and run the project on Android Studio

1. Launch Android Studio and select "Open an existing Android Studio project".
2. When the IDE asks you for the project location, select `uhabits` and click "Ok".
@@ -41,7 +41,7 @@ The repository will be downloaded to the directory `uhabits`.

The following instructions were tested on **Ubuntu Linux 18.04 LTS** and may need to be modified for other operating systems.

**Step 1: Install basic packages**
### Step 1: Install basic packages

To build the application, some basic packages are required. The package `git` is required to download the source code, while `openjdk-8-jdk-headless` is required for compiling Java and Kotlin files.

@@ -53,14 +53,14 @@ sudo apt-get install -y git openjdk-8-jdk-headless
**IMPORTANT:** Newer JDK versions have not been tested and may not work correctly.


**Step 2: Install Android SDK tools**
### Step 2: Install Android SDK tools

The Android SDK tools contains many necessary tools for developing and debugging Android applications. It can be obtained as part of Android Studio, but, for simple command line usage, it can also be downloaded individually.

1. Download the file `sdk-tools-linux-4333796.zip` (or a newer version) from https://developer.android.com/studio/#downloads, and extract it somewhere. In this guide, we assume that it was extracted to `/opt/android-sdk/tools`; that is, the script `/opt/android-sdk/tools/bin/sdkmanager` should exist.
1. Download the file `sdk-tools-linux-4333796.zip` (or a newer version) from <https://developer.android.com/studio/#downloads>, and extract it somewhere. In this guide, we assume that it was extracted to `/opt/android-sdk/tools`; that is, the script `/opt/android-sdk/tools/bin/sdkmanager` should exist.

2. Append the following lines to `~/.profile`, so that other tools can locate your Android SDK installation. It is necessary to restart your terminal for these changes to take effect.
```
```bash
export PATH="$PATH:/opt/android-sdk/tools/bin"
export PATH="$PATH:/opt/android-sdk/platform-tools"
export ANDROID_HOME="/opt/android-sdk"
@@ -71,21 +71,19 @@ export ANDROID_HOME="/opt/android-sdk"
yes | sdkmanager --licenses
```

**Step 3: Download the source code**
### Step 3: Download the source code

To create a complete copy of the source code repository, navigate to your home directory and run:
```bash
git clone https://github.com/iSoron/uhabits.git
```
The repository will be downloaded to the directory `uhabits`.

**Step 4: Compile the source code**
### Step 4: Compile the source code

1. Navigate to the directory `uhabits`
2. Run `./gradlew assembleDebug --stacktrace`

If the compilation is successful, a debug APK will be generated somewhere inside the folder `uhabits-android/build/`. Currently, the full path is the following, but it may change in the future:
If the compilation is successful, a debug APK will be generated somewhere inside the folder `uhabits-android/build/`. Currently, the full path is `./uhabits-android/build/outputs/apk/debug/uhabits-android-debug.apk`, but it may change in the future.

./uhabits-android/build/outputs/apk/debug/uhabits-android-debug.apk

The APK can be installed using the tool `adb`, which should have been automatically installed at `/opt/android-sdk/platform-tools/adb` during compilation of the project.
11 changes: 0 additions & 11 deletions docs/GUIDELINES.md
Original file line number Diff line number Diff line change
@@ -12,17 +12,6 @@

Please see `docs/BUILD.md` and `docs/TEST.md`

## Directory Layout

* `docs` Documentation for developers.
* `landing` Source code for our [landing page](http://loophabits.org/).
* `uhabits-android` Android-specific code.
* `uhabits-core` Common code used by all platforms (Android, iOS).
* `uhabits-core-legacy` Proof-of-concept module, developed to evaluate the feasibility of using Kotlin multiplatform for the app; not currently used, and it will be removed soon, once all useful code is ported to the other modules.
* `uhabits-ios` Experimental iOS port of Loop. Not currently used in production.
* `uhabits-server` Source code for any server-side components the app (for example, device sync).
* `uhabits-web` Experimental web port of Loop. Not currently used in production.

## Branching Policy

This repository uses the [git-flow branching model](https://nvie.com/posts/a-successful-git-branching-model/). Basically, there are two main branches, `dev` and `master`. All the development takes place in the `dev` branch. After the new features have been implemented and tested, they are merged into the `master` branch and a new version of the app is released. Please submit your pull requests against the `dev` branch.
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -6,3 +6,6 @@ android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
org.gradle.configureondemand=true
org.gradle.warning.mode=all
org.gradle.caching=true
Loading