Compare commits

...

595 Commits

Author SHA1 Message Date
2163a2b93b Update CHANGELOG.md 2021-05-23 17:39:34 -05:00
afad56ab91 Update test screenshots; automatically fetch 2021-05-23 15:34:59 -05:00
ece1b93f8d GitHub Actions: Increase number of attempts 2021-05-23 11:56:50 -05:00
10416e40fa Update CHANGELOG.md 2021-05-23 11:51:39 -05:00
88f8581acc Make CheckmarkWidget resizable; remove fixed aspect ratio 2021-05-23 11:49:49 -05:00
b33dd2a994 Ensure RingView.diameter is never zero
In rare cases, it seems either that `onDraw` is called before `onMeasure` or
that `onMeasure` is called with a view that has zero height/width. This causes
`reallocateCache` to produce an IllegalArgumentException. This patch ensures
that diameter is never zero.

Fixes #904
2021-05-23 11:21:49 -05:00
d87961d800 Fix missing placeholder in some translations; update remaining ones
Fixes #926
2021-05-23 10:50:26 -05:00
38d2606d6d Fix IllegalStateException in androidx.customview.view
Fixes #906
2021-05-22 12:53:03 -05:00
0a91c097e8 Update CHANGELOG 2021-05-21 19:42:37 -05:00
sumanabhi
b1c53bd820 Added the Decimal Support while entering target for any Habit. 2021-05-21 19:40:47 -05:00
c973f93424 Fix small issues with font size 2021-05-15 20:22:42 -05:00
fcadbe7c38 Handle numerical habits with target value of zero
Fixes #903
2021-05-15 20:11:20 -05:00
89e3dd7655 Update CHANGELOG 2021-05-09 17:18:16 -05:00
df56608a5d Re-add signing config 2021-05-09 17:04:42 -05:00
3489f176d6 translators: Remove debug statements 2021-05-09 17:04:16 -05:00
75fdd9d2b1 Temporarily remove outdated publish.yml workflow 2021-05-09 16:31:23 -05:00
dd1999681f Small adjustments to numeric checkmark widget 2021-05-09 16:24:59 -05:00
63883032c4 Update screenshots and description 2021-04-29 21:32:17 -05:00
a8c9b1b71c Update CHANGELOG 2021-04-29 19:35:46 -05:00
61529fde4d Update translations 2021-04-29 19:02:35 -05:00
1050cc4e47 GitHub Actions: Enable APIs 23 to 28 2021-04-26 21:24:29 -05:00
a7845c9290 Make large-tests pass on API 23 2021-04-26 21:21:51 -05:00
1feefe107c Make large-tests pass on API 25 2021-04-26 18:28:37 -05:00
1654ff9af3 GitHub Actions: Enable API 26 2021-04-25 23:56:53 -05:00
58adff6a22 build.sh: Run tests in parallel 2021-04-25 23:46:34 -05:00
2728c311d8 Large tests: Make compatible with API 27 2021-04-25 19:45:02 -05:00
b561dfe90d GitHub Actions: Large tests 2021-04-24 21:27:01 -05:00
53a40b2cfa Update translations 2021-04-22 23:18:42 -05:00
98ce802f87 Remove useless statement 2021-04-22 23:11:41 -05:00
853b4275be Parse translators from Crowdin report; group by language
Fixes #669
2021-04-22 23:06:35 -05:00
df4355c072 Switch to androidx.preference.PreferenceManger 2021-04-18 22:17:25 -05:00
33c3feb11a Make FrequencyPickerDialog translatable 2021-04-18 10:34:35 -05:00
f88a9bd46a Remove -alpha from version name 2021-04-18 10:04:56 -05:00
5dd9f43464 Update translations 2021-04-18 09:57:34 -05:00
4a13623b2c Update translations 2021-04-18 09:26:12 -05:00
6b368bffdf Update measurable_example 2021-04-18 09:09:46 -05:00
8d87988871 Add arrows to sort menu 2021-04-18 09:02:40 -05:00
256ca13dca Small tweaks to preferences screen; restore default accent color 2021-04-18 07:29:03 -05:00
b0c5552cfa Remove unused imports 2021-04-17 22:01:17 -05:00
616ab4861d CheckmarkWidget: Always show circle
Fixes #790
2021-04-17 21:56:50 -05:00
fcff067b2e DatePicker: Implement dark theme
Fixes #858
2021-04-17 21:52:00 -05:00
da018fc64d Temporarily remove device sync 2021-04-17 19:53:24 -05:00
f27a9f9103 Revert to ktor 1.5.2
Newer version seems to require unpublished dependencies.
2021-04-17 19:35:28 -05:00
engineering4good
fe59565ded Fix app crash on habit deletion when sorted not manually. (#874) 2021-04-17 06:31:19 -05:00
dependabot[bot]
419d2faa78 Bump daggerVersion from 2.34 to 2.34.1
Bumps `daggerVersion` from 2.34 to 2.34.1.

Updates `dagger` from 2.34 to 2.34.1
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.34...dagger-2.34.1)

Updates `dagger-compiler` from 2.34 to 2.34.1
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.34...dagger-2.34.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-14 09:13:26 +02:00
dependabot[bot]
55f3bab13a Bump daggerVersion from 2.33 to 2.34
Bumps `daggerVersion` from 2.33 to 2.34.

Updates `dagger` from 2.33 to 2.34
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.33...dagger-2.34)

Updates `dagger-compiler` from 2.33 to 2.34
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.33...dagger-2.34)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-08 11:54:09 +02:00
dependabot[bot]
212cc4259b Bump ktorVersion from 1.5.2 to 1.5.3
Bumps `ktorVersion` from 1.5.2 to 1.5.3.

Updates `ktor-client-mock` from 1.5.2 to 1.5.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/commits)

Updates `ktor-jackson` from 1.5.2 to 1.5.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/commits)

Updates `ktor-client-android` from 1.5.2 to 1.5.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/commits)

Updates `ktor-client-core` from 1.5.2 to 1.5.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/commits)

Updates `ktor-client-jackson` from 1.5.2 to 1.5.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/commits)

Updates `ktor-client-json` from 1.5.2 to 1.5.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/commits)

Updates `ktor-server-netty` from 1.5.2 to 1.5.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/commits)

Updates `ktor-server-core` from 1.5.2 to 1.5.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/commits)

Updates `ktor-html-builder` from 1.5.2 to 1.5.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/commits)

Updates `ktor-server-tests` from 1.5.2 to 1.5.3
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-05 11:09:10 +02:00
Quentin Hibon
e1ec8cfa10 Fix build instructions link in README.md
Fixes #871
2021-04-04 17:16:57 +02:00
Quentin Hibon
6af2edb690 Delete v21 resources (#864) 2021-04-01 06:12:37 -05:00
dependabot[bot]
9d6b3ebb25 Bump annotation from 1.1.0 to 1.2.0
Bumps annotation from 1.1.0 to 1.2.0.

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-25 09:38:54 +01:00
dependabot[bot]
ed0744d5ab Bump kotlin-stdlib-jdk8 from 1.4.31 to 1.4.32
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.4.31 to 1.4.32.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-25 09:38:32 +01:00
dependabot[bot]
b59886dc77 Bump kotlin-stdlib from 1.4.31 to 1.4.32
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.4.31 to 1.4.32.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-23 18:40:03 +01:00
dependabot[bot]
23954eed27 Bump guava from 30.1-android to 30.1.1-android
Bumps [guava](https://github.com/google/guava) from 30.1-android to 30.1.1-android.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-22 14:12:50 +01:00
071b6bd090 HeaderView: Fix padding 2021-03-18 22:23:58 -05:00
298bf1a538 BarChart: Fix small bars 2021-03-18 22:16:26 -05:00
8b2285787c Fix numerical spinner in BarCardView 2021-03-18 22:09:54 -05:00
c83cd5fd10 Render YES_AUTO as outlined checkmark 2021-03-18 22:04:23 -05:00
381c67d020 Allow unitless numerical habits 2021-03-18 22:04:23 -05:00
81cffc7253 Fix dialog text color 2021-03-18 22:04:23 -05:00
e745b959ca Fix multiple selection 2021-03-18 22:04:23 -05:00
dependabot[bot]
d2ee210376 Bump opencsv from 5.3 to 5.4 (#849)
Bumps opencsv from 5.3 to 5.4.

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-15 16:56:19 -05:00
Quentin Hibon
9c81f22a4d Start snooze activity after later is selected from lock screen (#840)
Fixes #787.
2021-03-15 08:34:42 -05:00
51947576aa HistoryEditorDialog: Use system theme 2021-03-14 09:17:26 -05:00
dependabot[bot]
6411f65fa5 Bump commons-lang3 from 3.11 to 3.12.0 (#833)
Bumps commons-lang3 from 3.11 to 3.12.0.

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-13 19:57:40 -06:00
dependabot[bot]
a04349bfaa Bump ktorVersion from 1.5.1 to 1.5.2 (#832)
Bumps `ktorVersion` from 1.5.1 to 1.5.2.

Updates `ktor-client-mock` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.1...1.5.2)

Updates `ktor-jackson` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.1...1.5.2)

Updates `ktor-client-android` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.1...1.5.2)

Updates `ktor-client-core` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.1...1.5.2)

Updates `ktor-client-jackson` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.1...1.5.2)

Updates `ktor-client-json` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.1...1.5.2)

Updates `ktor-server-netty` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.1...1.5.2)

Updates `ktor-server-core` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.1...1.5.2)

Updates `ktor-html-builder` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.1...1.5.2)

Updates `ktor-server-tests` from 1.5.1 to 1.5.2
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.1...1.5.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-13 19:31:56 -06:00
7b68938e14 ButtonView: Adjust size of question marks 2021-03-13 18:45:18 -06:00
ee462715de Use different colors for YES_AUTO and NO; increase contrast slightly 2021-03-13 18:44:04 -06:00
a95da72e19 Attempt to make EntryPanelViewTest less flaky 2021-03-13 16:58:27 -06:00
3ece80f3da Remove unused class and resource 2021-03-13 16:35:27 -06:00
dependabot[bot]
e00ff99af7 Bump kotlin-stdlib-jdk8 from 1.4.30 to 1.4.31 (#821) 2021-03-11 06:20:02 -06:00
Quentin Hibon
fc26d7967f Make validation errors readable (#837)
Fixes #757.
2021-03-10 20:37:43 -06:00
9b753b07f8 Temporarily disable flaky test 2021-03-10 20:25:06 -06:00
dependabot[bot]
73deb535ef Bump kotlin-stdlib from 1.4.30 to 1.4.31 (#820)
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.4.30 to 1.4.31.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-07 11:01:03 -06:00
dependabot[bot]
a733e6ddf0 Bump daggerVersion from 2.32 to 2.33 (#819)
Bumps `daggerVersion` from 2.32 to 2.33.

Updates `dagger` from 2.32 to 2.33
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.32...dagger-2.33)

Updates `dagger-compiler` from 2.32 to 2.33
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.32...dagger-2.33)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-07 11:00:49 -06:00
dependabot[bot]
86c7200e6b Bump desugar_jdk_libs from 1.1.1 to 1.1.5 (#818)
Bumps [desugar_jdk_libs](https://github.com/google/desugar_jdk_libs) from 1.1.1 to 1.1.5.
- [Release notes](https://github.com/google/desugar_jdk_libs/releases)
- [Changelog](https://github.com/google/desugar_jdk_libs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/desugar_jdk_libs/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-07 11:00:35 -06:00
dependabot[bot]
15282e7ea6 Bump kotlin-css-jvm (#809)
Bumps kotlin-css-jvm from 1.0.0-pre.144-kotlin-1.4.30 to 1.0.0-pre.148-kotlin-1.4.30.

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-22 07:49:12 -06:00
Quentin Hibon
96f87df052 Implement task to generate translator layout from a text file (#759)
Related to #669
2021-02-22 07:46:52 -06:00
dependabot[bot]
bc623f044d Bump dexmaker-mockito from 2.28.0 to 2.28.1
Bumps [dexmaker-mockito](https://github.com/linkedin/dexmaker) from 2.28.0 to 2.28.1.
- [Release notes](https://github.com/linkedin/dexmaker/releases)
- [Changelog](https://github.com/linkedin/dexmaker/blob/master/CHANGELOG.md)
- [Commits](https://github.com/linkedin/dexmaker/compare/2.28.0...2.28.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-15 21:03:51 -06:00
dependabot[bot]
773eef26e7 Bump junit from 4.13.1 to 4.13.2
Bumps [junit](https://github.com/junit-team/junit4) from 4.13.1 to 4.13.2.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.13.1.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.13.1...r4.13.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-15 21:03:22 -06:00
b58af03a7c HabitBullCSVImporter: Accept multiple date formats
Fixes 762
2021-02-13 18:00:22 -06:00
c53997ffcc Update fa_star_half_o unicode 2021-02-13 09:02:17 -06:00
11d55bbf02 Write failing tests for EmptyListViewTest 2021-02-13 09:01:54 -06:00
Quentin Hibon
50ebff3edf Adapt message when all habits are completed
Closes #700.
2021-02-13 08:14:40 -06:00
8e1aa3d01e Merge pull request #784 from hiqua/fontawesome
Upgrade fontawesome to 5.15.2
2021-02-13 08:12:25 -06:00
dependabot[bot]
ea66cf04b3 Bump test-butler-library from 2.1.1 to 2.2.1 (#788)
Bumps [test-butler-library](https://github.com/linkedin/test-butler) from 2.1.1 to 2.2.1.
- [Release notes](https://github.com/linkedin/test-butler/releases)
- [Changelog](https://github.com/linkedin/test-butler/blob/master/CHANGELOG.md)
- [Commits](https://github.com/linkedin/test-butler/compare/2.1.1...2.2.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-12 07:09:11 -06:00
Quentin Hibon
b1da72dc3a Bump org.jlleitschuh.gradle.ktlint from 9.4.1 to 10.0.0 (#786) 2021-02-12 07:07:39 -06:00
Quentin Hibon
91bd17bb9e Upgrade fontawesome to 5.15.2 2021-02-10 16:06:55 +01:00
fca9557108 Merge pull request #776 from hiqua/fix_766
Restore notification sound customization setting
2021-02-09 07:36:31 -06:00
dependabot[bot]
d76a4a84d0 Bump daggerVersion from 2.31.2 to 2.32 (#779)
Bumps `daggerVersion` from 2.31.2 to 2.32.

Updates `dagger` from 2.31.2 to 2.32
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.31.2...dagger-2.32)

Updates `dagger-compiler` from 2.31.2 to 2.32
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.31.2...dagger-2.32)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-09 07:33:57 -06:00
Quentin Hibon
8790c0e87b Delete snooze_interval preference 2021-02-09 10:14:25 +01:00
Quentin Hibon
bc461e1239 Restore notification sound customization setting
For devices older than Android Oreo, notification sound customization has been
disabled since aadfac68cd. We enable it again.

Fixes #766.
2021-02-09 09:22:53 +01:00
589fd2f0f1 build.sh: Restore fetch-images and accept-images 2021-02-08 21:38:15 -06:00
dependabot[bot]
2e94bebcac Bump material from 1.2.1 to 1.3.0 (#764)
Bumps [material](https://github.com/material-components/material-components-android) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/material-components/material-components-android/releases)
- [Commits](https://github.com/material-components/material-components-android/compare/1.2.1...1.3.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-08 21:26:35 -06:00
dependabot[bot]
ff748b27a5 Bump kotlin-css-jvm (#763)
Bumps kotlin-css-jvm from 1.0.0-pre.144-kotlin-1.4.21 to 1.0.0-pre.144-kotlin-1.4.30.

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-08 21:26:20 -06:00
dependabot[bot]
8522318ed1 Bump kotlin-stdlib from 1.4.21 to 1.4.30 (#761)
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.4.21 to 1.4.30.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.4.21...v1.4.30)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-08 21:25:56 -06:00
dependabot[bot]
1f08d2f71c Bump kotlin-stdlib-jdk8 from 1.4.21 to 1.4.30 (#760)
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.4.21 to 1.4.30.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.4.21...v1.4.30)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-08 21:25:48 -06:00
Quentin Hibon
7fb3489ca8 Fix shellcheck warnings (#778) 2021-02-08 21:23:26 -06:00
129c86a030 about.xml: Sort developers by number of commits 2021-01-31 11:35:44 -06:00
e4121b2564 Merge branch 'master' into dev 2021-01-30 21:41:14 -06:00
98abebe099 Merge branch 'hotfix/v1.8.12' 2021-01-30 20:47:36 -06:00
0f86cb4d53 Update list of developers 2021-01-30 20:39:19 -06:00
Kristian Tashkov
4dd77463fb Update widgets at midnight (#634) 2021-01-30 20:36:37 -06:00
Quentin Hibon
2cf3347f8c Set dataOffset when attaching a new CardView
Fixes #713.
2021-01-30 20:15:26 -06:00
5516f40571 Bump version to 1.8.12; update CHANGELOG and release notes 2021-01-30 19:53:57 -06:00
c006659ba4 Use Nexus 4 screen size in build.sh; adjust BackupSteps accordingly 2021-01-30 19:42:10 -06:00
5be2c51d79 Regression tests: minor code cleanup 2021-01-30 19:22:32 -06:00
Quentin Hibon
2dcce080d3 Set dataOffset when attaching a new CardView
Fixes #713.
2021-01-30 18:36:07 -06:00
Quentin Hibon
6c3b4135c2 Implement test reproducing #713 2021-01-30 18:36:07 -06:00
48c1adb3bb HabitCardListAdapter: Return copy of list of selected items
Previously, HabitCardListAdapter returned a pointer to the list, instead of a
copy. By the time other parts of the application were reading the list, its
contents had already changed. This prevented the user from deleting or
archiving habits.
2021-01-30 10:28:42 -06:00
89bde4c9ae verifyDisplayGraphs: Update class names 2021-01-30 09:49:35 -06:00
a7e2e0e8da Acceptance tests: fix imports; remove unused function 2021-01-30 08:45:43 -06:00
64d77fbb6b build.sh: Use avdmanager from cmdline-tools 2021-01-30 08:30:14 -06:00
Quentin Hibon
4b80e60b2b Fix typo (#755) 2021-01-30 07:48:09 -06:00
dependabot[bot]
0f80505735 Bump guava from 30.0-android to 30.1-android (#750)
Bumps [guava](https://github.com/google/guava) from 30.0-android to 30.1-android.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-28 21:37:59 -06:00
dependabot[bot]
c26c140310 Bump ktorVersion from 1.5.0 to 1.5.1 (#751)
Bumps `ktorVersion` from 1.5.0 to 1.5.1.

Updates `ktor-client-mock` from 1.5.0 to 1.5.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.0...1.5.1)

Updates `ktor-jackson` from 1.5.0 to 1.5.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.0...1.5.1)

Updates `ktor-client-android` from 1.5.0 to 1.5.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.0...1.5.1)

Updates `ktor-client-core` from 1.5.0 to 1.5.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.0...1.5.1)

Updates `ktor-client-jackson` from 1.5.0 to 1.5.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.0...1.5.1)

Updates `ktor-client-json` from 1.5.0 to 1.5.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.0...1.5.1)

Updates `ktor-server-netty` from 1.5.0 to 1.5.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.0...1.5.1)

Updates `ktor-server-core` from 1.5.0 to 1.5.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.0...1.5.1)

Updates `ktor-html-builder` from 1.5.0 to 1.5.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.0...1.5.1)

Updates `ktor-server-tests` from 1.5.0 to 1.5.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/1.5.0...1.5.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-28 21:37:22 -06:00
dependabot[bot]
c05e008569 Bump sqlite-jdbc from 3.25.2 to 3.34.0 (#748)
Bumps [sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.25.2 to 3.34.0.
- [Release notes](https://github.com/xerial/sqlite-jdbc/releases)
- [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG)
- [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.25.2...3.34.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-28 21:35:48 -06:00
a5255690ed Revert to Kotlin 1.4.21
Kotlin 1.4.21-2 seems to be a pre-release.
2021-01-28 21:35:08 -06:00
56f0bbb7bd Remove unused equalsverifier dependency 2021-01-28 21:35:08 -06:00
4e72bf93f8 Issue templates: sort feature requests by popularity 2021-01-28 08:04:07 -06:00
d31e42446e Add "Help & FAQ" to issue template 2021-01-28 07:59:25 -06:00
dependabot[bot]
8ea71dc2b5 Bump kotlin-css-jvm (#744)
Bumps kotlin-css-jvm from 1.0.0-pre.143-kotlin-1.4.21 to 1.0.0-pre.144-kotlin-1.4.21.

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-28 07:11:08 -06:00
3ba26ac67e Merge pull request #747 from iSoron/dependabot/gradle/org.hamcrest-hamcrest-2.2
Bump hamcrest from 2.1 to 2.2
2021-01-28 07:01:51 -06:00
dependabot[bot]
8537e0f910 Bump hamcrest from 2.1 to 2.2
Bumps [hamcrest](https://github.com/hamcrest/JavaHamcrest) from 2.1 to 2.2.
- [Release notes](https://github.com/hamcrest/JavaHamcrest/releases)
- [Changelog](https://github.com/hamcrest/JavaHamcrest/blob/master/CHANGES.md)
- [Commits](https://github.com/hamcrest/JavaHamcrest/compare/v2.1...v2.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-28 07:17:40 +00:00
a6c9ea22e6 Merge branch 'midnight_delay_option_2' into dev 2021-01-27 20:06:44 -06:00
5767817de2 Midnight delay: Make text shorter 2021-01-27 20:06:31 -06:00
b80344a443 Merge pull request #743 from hiqua/update_mockito
Delete obsolete mockito dependencies
2021-01-27 20:01:40 -06:00
f36bc788c7 Merge pull request #740 from hiqua/sdk_30
Increase targetSdk to 30
2021-01-27 19:59:13 -06:00
dependabot[bot]
22136774de Bump simpleclient_hotspot from 0.9.0 to 0.10.0 (#742)
Bumps [simpleclient_hotspot](https://github.com/prometheus/client_java) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/prometheus/client_java/releases)
- [Commits](https://github.com/prometheus/client_java/compare/parent-0.9.0...parent-0.10.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-27 19:57:38 -06:00
dependabot[bot]
be39237a22 Bump simpleclient from 0.9.0 to 0.10.0 (#741)
Bumps [simpleclient](https://github.com/prometheus/client_java) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/prometheus/client_java/releases)
- [Commits](https://github.com/prometheus/client_java/compare/parent-0.9.0...parent-0.10.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-27 19:56:24 -06:00
dependabot[bot]
836eebd20b Bump kotlin-stdlib-jdk8 from 1.4.21 to 1.4.21-2 (#738)
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.4.21 to 1.4.21-2.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.4.21...v1.4.21-2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-27 19:54:55 -06:00
Quentin Hibon
8d2aebaf7f Delete obsolete mockito dependencies 2021-01-27 15:44:22 +01:00
dependabot[bot]
1c2efb6c22 Bump junit from 4.12 to 4.13.1 (#737) 2021-01-27 07:13:46 -06:00
dependabot[bot]
784877871a Bump opencsv from 3.10 to 5.3 (#735) 2021-01-27 07:13:27 -06:00
Quentin Hibon
4a2fb2ac47 Fix visual glitch on popups when using dark theme (#730) 2021-01-27 07:11:40 -06:00
dependabot[bot]
7caf22bd7a Bump ktorVersion from 1.4.2 to 1.5.0 (#728) 2021-01-27 07:11:06 -06:00
Quentin Hibon
2d943b5942 Fix signature of onSharedPreferenceChanged
The 'key' argument is null when called from android.app.SharedPreferencesImpl.
2021-01-27 12:09:23 +01:00
Quentin Hibon
dd4e0ee6f9 Increase targetSdk to 30 2021-01-27 11:00:50 +01:00
Quentin Hibon
bb8d4abb9e Implement the midnight delay option
Closes #694.
2021-01-27 09:52:28 +01:00
dependabot[bot]
64069a6e7f Bump kotlin-stdlib from 1.4.21 to 1.4.21-2 (#734)
Bumps [kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.4.21 to 1.4.21-2.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.4.21...v1.4.21-2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-26 22:12:35 -06:00
dependabot[bot]
9ead803b6c Bump logback-classic from 1.2.1 to 1.2.3 (#733)
Bumps logback-classic from 1.2.1 to 1.2.3.

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-26 22:12:19 -06:00
dependabot[bot]
af6387f1fc Bump kotlin-css-jvm (#731)
Bumps kotlin-css-jvm from 1.0.0-pre.31-kotlin-1.2.41 to 1.0.0-pre.143-kotlin-1.4.21.

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-26 22:12:03 -06:00
dependabot[bot]
6d0764bbb8 Bump simpleclient_httpserver from 0.9.0 to 0.10.0
Bumps [simpleclient_httpserver](https://github.com/prometheus/client_java) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/prometheus/client_java/releases)
- [Commits](https://github.com/prometheus/client_java/compare/parent-0.9.0...parent-0.10.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-26 20:10:44 -06:00
dependabot[bot]
eb9d017882 Bump commons-lang3 from 3.5 to 3.11
Bumps commons-lang3 from 3.5 to 3.11.

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-26 20:07:14 -06:00
dependabot[bot]
ec630ad1b1 Bump test-butler-library from 1.3.1 to 2.1.1
Bumps [test-butler-library](https://github.com/linkedin/test-butler) from 1.3.1 to 2.1.1.
- [Release notes](https://github.com/linkedin/test-butler/releases)
- [Changelog](https://github.com/linkedin/test-butler/blob/master/CHANGELOG.md)
- [Commits](https://github.com/linkedin/test-butler/compare/1.3.1...2.1.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-26 20:06:59 -06:00
Quentin Hibon
df30c7c764 Disable transparency for stacked widgets
Closes #687.
2021-01-26 20:06:12 -06:00
dependabot[bot]
7a73f9c8c7 Bump daggerVersion from 2.25.4 to 2.31.2 (#725) 2021-01-25 08:04:49 -06:00
045612c00f Add Dependabot configuration file 2021-01-25 07:10:40 -06:00
25d3587545 Add hiqua to list of developers 2021-01-25 06:51:26 -06:00
4ffd78545d Merge pull request #716 from hiqua/dev 2021-01-25 06:43:13 -06:00
Quentin Hibon
14d018c327 Convert Timestamp to data class 2021-01-25 12:18:05 +01:00
Quentin Hibon
f1c88797a3 Clean up code after conversions 2021-01-25 12:18:05 +01:00
Quentin Hibon
f882e18be9 Convert BaseUserInterfaceTest 2021-01-25 12:18:05 +01:00
Quentin Hibon
0fc9bb57ae Convert BaseViewTest 2021-01-25 12:18:05 +01:00
Quentin Hibon
22dcd9f7ae Convert AndroidTaskRunner 2021-01-25 12:18:05 +01:00
Quentin Hibon
7d361b2203 Convert Task and TaskRunner 2021-01-25 12:18:05 +01:00
Quentin Hibon
8131d37d8e Convert SingleThreadTaskRunner 2021-01-25 12:18:05 +01:00
Quentin Hibon
6485c3efee Convert ExportCSVTask 2021-01-25 12:18:05 +01:00
Quentin Hibon
2bfbff9b14 Convert ExportDBTask and ImportDataTask 2021-01-25 12:18:05 +01:00
Quentin Hibon
9a72141567 Convert PerformanceTest 2021-01-25 12:18:05 +01:00
Quentin Hibon
6992b5186e Clean up code after conversions 2021-01-25 12:18:05 +01:00
Quentin Hibon
18db571507 Properly check that a setter is never used 2021-01-25 12:18:05 +01:00
Quentin Hibon
09794ccb68 Move ThingRecord back into RepositoryTest 2021-01-25 12:18:05 +01:00
Quentin Hibon
7644f52dfd Don't open ThingRecord 2021-01-25 12:18:05 +01:00
Quentin Hibon
21fa636e0c Convert BaseAndroidTest 2021-01-25 12:18:05 +01:00
Quentin Hibon
df755d30ee Convert HabitsApplicationTest 2021-01-25 12:18:05 +01:00
Quentin Hibon
7f0c4626b0 Convert HabitFixtures (androidtest) 2021-01-25 12:18:05 +01:00
Quentin Hibon
ec42fda336 Convert AndroidDatabaseTest 2021-01-25 12:18:05 +01:00
Quentin Hibon
def9ff9746 Convert activities.common.views (androidTest) 2021-01-25 12:18:05 +01:00
Quentin Hibon
a7df0bde3e Convert core.models.sqlite 2021-01-25 12:18:05 +01:00
Quentin Hibon
1cec5a6067 Convert model memory 2021-01-25 12:18:05 +01:00
Quentin Hibon
a58cbffb81 Convert HabitList and ModelObservable 2021-01-25 12:18:05 +01:00
Quentin Hibon
30630c3358 Convert Timestamp 2021-01-25 12:18:05 +01:00
Quentin Hibon
98f9693cff Convert views 2021-01-25 12:18:05 +01:00
Quentin Hibon
228be95f9c convert widget tests 2021-01-25 12:18:05 +01:00
Quentin Hibon
457c58a660 Convert RepositoryTest 2021-01-25 12:18:05 +01:00
Quentin Hibon
39cec6f11d Convert Preferences 2021-01-25 12:18:05 +01:00
Quentin Hibon
8f5f72d9fd Convert ReminderScheduler 2021-01-25 10:56:59 +01:00
Quentin Hibon
b21eb3f118 Finish uhabits-core ui conversion 2021-01-25 10:56:59 +01:00
Quentin Hibon
136ec5b49b Convert most of code remaining in uhabits-core 2021-01-25 10:56:59 +01:00
Quentin Hibon
e84cc8e8b1 Convert HabitCardListCache 2021-01-25 10:56:59 +01:00
Quentin Hibon
26fb76f95f Add mockitokotlin dependency to androidTest 2021-01-25 10:56:59 +01:00
Quentin Hibon
68a8f9d356 Enable mockito inline extension 2021-01-25 10:56:59 +01:00
Quentin Hibon
f541f47476 Use correct BREAK_STRATEGY_BALANCED constant 2021-01-25 10:56:59 +01:00
Quentin Hibon
9d4cfbd270 Fix preferences 2021-01-25 10:56:59 +01:00
1869d05591 ScoreTest: Use static imports for hamcrest 2021-01-21 06:46:23 -06:00
3f8b1008b4 Merge branch 'feature/gradle.kts' into dev 2021-01-21 06:41:34 -06:00
e671949dd2 Merge pull request #709 from hiqua/dev 2021-01-21 06:24:11 -06:00
Quentin Hibon
dedeb13f46 Clean up kotlin code
* static imports
* less nullable types
* format
2021-01-19 14:06:18 +01:00
Quentin Hibon
9d0fbb9ea9 Convert WeekdayList 2021-01-18 16:13:19 +01:00
Quentin Hibon
97dcf98e2b Convert org.isoron.uhabits.utils 2021-01-18 16:13:19 +01:00
Quentin Hibon
25b25acc94 Convert org.isoron.uhabits.acceptance 2021-01-18 16:13:19 +01:00
Quentin Hibon
ac6df47818 Convert uhabits-core (jvmTest) 2021-01-18 16:13:19 +01:00
Quentin Hibon
0f828cbd3a Convert uhabits-android (test) 2021-01-18 16:13:19 +01:00
Quentin Hibon
eb8d39fbe3 Convert org.isoron.uhabits.core.ui.widgets 2021-01-18 16:13:19 +01:00
Quentin Hibon
11831a2b24 Convert org.isoron.uhabits.inject 2021-01-18 16:13:19 +01:00
Quentin Hibon
e9816a22a3 Convert SettingsFragment 2021-01-18 16:13:19 +01:00
Quentin Hibon
8165b5417f Convert HabitCardListAdapter 2021-01-18 16:13:19 +01:00
Quentin Hibon
714771fbc3 Convert org.isoron.uhabits.activities.common.dialogs 2021-01-18 16:13:19 +01:00
Quentin Hibon
a2a8dc4489 Mention git pre-commit hook in GUIDELINES.md 2021-01-18 16:13:19 +01:00
Quentin Hibon
bbe39f8523 Replace appendln with appendLine 2021-01-18 16:13:19 +01:00
Quentin Hibon
a69490a23a Update kotlin version 2021-01-18 16:02:48 +01:00
Quentin Hibon
b6223c3805 Fix outdated javadocs 2021-01-18 16:02:48 +01:00
e3524c112a Convert uhabits-android/build.gradle to Kotlin 2021-01-16 15:31:22 -06:00
8c0141508d Convert uhabits-server/build.gradle to Kotlin; use standard paths 2021-01-16 14:44:24 -06:00
8206450456 Convert top-level build.gradle to Kotlin 2021-01-16 13:55:26 -06:00
a5dfe0ec51 Convert uhabits-core/build.gradle to Kotlin 2021-01-16 09:45:23 -06:00
9a4aaf47bc Merge pull request #707 from hiqua/dev 2021-01-14 06:41:37 -06:00
Quentin Hibon
485e4245ff Fix kotlin null check 2021-01-12 18:25:08 +01:00
Quentin Hibon
72a7cd9685 Fix ambiguous @Module 2021-01-12 18:25:00 +01:00
Quentin Hibon
95a7c4f474 Fix gradle task 'ktlintApplyToIdea' 2021-01-12 17:36:11 +01:00
Quentin Hibon
f208601bc4 Convert uhabits.receivers to kotlin 2021-01-12 17:33:53 +01:00
Quentin Hibon
d5b9fda636 Convert SnoozeDelayPickerActivity to kotlin 2021-01-12 17:33:53 +01:00
99277491c8 Remove unused imports 2021-01-05 23:09:34 -06:00
2828dfcc75 Update copyright notices 2021-01-05 23:05:48 -06:00
b14aa668c2 Update BUILD.md 2021-01-05 22:57:11 -06:00
47de6243d3 Update GUIDELINES.md 2021-01-05 22:54:56 -06:00
7bad2c886b Fix GitHub Actions script 2021-01-05 22:31:49 -06:00
c4e496a5ff Update build scripts 2021-01-05 22:18:35 -06:00
7ee3e00e49 Create top-level gradle project; remove duplicated gradle wrappers 2021-01-05 22:03:01 -06:00
2f39b63723 Add ktlint to uhabits-core; clean up build.gradle 2021-01-05 21:24:20 -06:00
d279388884 Merge branch 'dev' into feature/kmm-merge 2021-01-05 20:43:37 -06:00
Marco Zanetti
358e1ccf42 Convert org.isoron.uhabits.core.utils to Kotlin (#699) 2021-01-05 20:33:49 -06:00
236d56bbf0 Remove unused files 2021-01-03 20:47:21 -06:00
68f9b8339f Flatten uhabits-android into a single gradle module 2021-01-03 20:44:55 -06:00
4a4356b72a Update build scripts 2021-01-03 17:35:31 -06:00
b71675585c Update path to uhabits-core-legacy 2021-01-03 14:52:17 -06:00
bebb356425 Reorganize top level directory 2021-01-03 14:43:49 -06:00
9fd36d8d53 Move uhabits-core to top level; all Java files to uhabits-core:jvmMain/jvmTest 2021-01-03 13:21:02 -06:00
1137088e20 Merge branch 'dev' into canvas 2021-01-03 12:02:32 -06:00
6f2b2ab883 Remove Google AutoFactory; expand Dagger imports
Fixes #681
2021-01-03 11:31:55 -06:00
d8fcc9160d Make uhabits-core a Kotlin multiplatform module 2021-01-03 10:21:28 -06:00
cb6843e08b Remove ShowHabitScreen and ShowHabitBehavior 2021-01-02 00:45:16 -06:00
162eac3bdf HistoryChart: Fix HistoryEditorDialog 2021-01-01 23:20:20 -06:00
e2d2b5b4b3 HistoryChart: Customizable first day of week 2021-01-01 17:47:28 -06:00
de3668db96 HistoryChart: Fix transparency 2021-01-01 11:32:38 -06:00
93a2ec3186 Replace HistoryChart by new Kotlin implementation 2021-01-01 09:36:23 -06:00
354c930d85 Replace BarChart by new Kotlin implementation 2020-12-31 15:20:00 -06:00
e97cdce467 Copy platform.{gui,io,time} from core; implement AndroidCanvas 2020-12-31 13:29:43 -06:00
13826f4934 ShowHabitActivity: Move presenters and view models to uhabits-core 2020-12-31 00:10:29 -06:00
1cdbc53dc5 EntryList: simplify groupBy 2020-12-30 22:45:33 -06:00
51b9517897 EntryList: remove getValues 2020-12-30 17:28:10 -06:00
a74a4b390b StreakList: Return copy of list, instead of a view to original list 2020-12-30 16:44:26 -06:00
79b134164a Convert remaining core.io classes to Kotlin 2020-12-30 16:36:27 -06:00
ced78e0b1f Update guidelines on code style 2020-12-30 15:29:26 -06:00
9087025418 Reformat all Kotlin files with ktlint; add check to build script 2020-12-30 15:15:12 -06:00
9a5263e508 Update GUIDELINES.md 2020-12-30 12:26:39 -06:00
75571e2eb0 Fix link 2020-12-30 12:23:21 -06:00
b5ed4b9a9c Merge branch 'dev' of github.com:iSoron/uhabits into dev 2020-12-30 12:19:42 -06:00
2daf08d22d Update developer guidelines 2020-12-30 12:18:19 -06:00
2e51c73ac0 Update README.md 2020-12-30 09:14:11 -06:00
298bb01762 Convert some core.io classes to Kotlin 2020-12-29 22:18:53 -06:00
a02c7bdc44 Convert core.database classes to Kotlin 2020-12-29 21:50:45 -06:00
feb3c98459 Convert HabitMatcher, Reminder and Streak to Kotlin 2020-12-29 20:21:38 -06:00
823d8bed7e Merge branch 'dev' of github.com:iSoron/uhabits into dev 2020-12-29 20:04:05 -06:00
68813580eb Merge branch 'master' into dev 2020-12-29 19:28:56 -06:00
6bc1b91cc6 Update README.md 2020-12-29 19:23:49 -06:00
56f91526e6 Update CHANGELOG 2020-12-29 18:51:12 -06:00
dbc6a16a98 Set forceDarkAllowed to false 2020-12-29 18:43:09 -06:00
4d3c5ad732 Convert HabitNotFoundException to Kotlin 2020-12-29 16:51:26 -06:00
307ff5c1ca Convert Frequency to Kotlin 2020-12-29 16:51:16 -06:00
3b86a17b49 Simplify StreakList 2020-12-29 16:20:45 -06:00
54fe849eef Remove MemoryStreakList.java 2020-12-29 15:04:18 -06:00
c023711d16 Convert ScoreList to Kotlin 2020-12-29 14:17:52 -06:00
9bc0f44777 ScoreList: Remove groupBy functions 2020-12-29 14:10:27 -06:00
4a3a767cb2 ScoreList: Recompute given interval 2020-12-29 13:42:11 -06:00
d0c37fef67 ScoreList: Remove reference to Habit 2020-12-29 13:24:12 -06:00
11863cd7b0 Simplify ScoreList 2020-12-29 12:53:14 -06:00
1c696e2561 Remove MemoryScoreList 2020-12-29 09:08:08 -06:00
43c5e450a8 Convert Score to Kotlin 2020-12-29 09:01:41 -06:00
0a84d8a1d8 ScoreList: Remove ModelObservable 2020-12-29 08:58:11 -06:00
354a4d08be buildEntriesFromInterval: selectively copy over 2020-12-29 08:50:46 -06:00
af93c0e488 BarChart: Update tests and images 2020-12-29 08:22:32 -06:00
b8aa322691 EntryList: Fix tests 2020-12-29 08:19:39 -06:00
a87987da87 Remove target from HistoryChart and BarChart 2020-12-29 08:14:17 -06:00
8b8e9d3980 EntryList: Make groupBy always return thousandths 2020-12-29 08:09:02 -06:00
a19f39308e Fixes to BarCard 2020-12-29 08:00:04 -06:00
0b23fbed86 Fix tests 2020-12-28 23:08:11 -06:00
d1eeb559cb Reorganize theme attributes; minor fixes to dialog style 2020-12-28 22:52:41 -06:00
2e4a82418f Fix usage of singular/plural in alert messages
Closes #405
Closes #131
2020-12-28 22:28:58 -06:00
fcdb400edf Merge branch 'Nirvyz/dev' into dev 2020-12-28 21:40:12 -06:00
Armand Dc
f80fb35e35 Fix color and font inconsistencies 2020-12-28 21:39:36 -06:00
056a7b722b build.sh: Replace wait by repeated checks 2020-12-28 21:17:35 -06:00
f4c0f353f3 Fix large tests for API 28 2020-12-28 21:12:03 -06:00
3fb7fbac51 build.sh: Create fresh AVD for large-tests 2020-12-28 21:11:41 -06:00
bd70746278 Fix UUID generation 2020-12-28 18:51:17 -06:00
c744d945a4 Redirect Help & FAQ to GitHub Discussions 2020-12-28 15:31:29 -06:00
f0696b3f60 Don't run actions when markdown files are changed 2020-12-28 14:50:39 -06:00
bc36f24551 FAQ: Fix typo 2020-12-28 14:47:14 -06:00
82b68b5f4e Update bug_report.md 2020-12-28 10:55:02 -06:00
e8238b5ed7 Enable widget stacks for all users 2020-12-28 10:35:30 -06:00
599f21fabb Delete feature_request.md 2020-12-27 21:18:15 -06:00
e91e2c1c96 Create config.yml 2020-12-27 21:17:48 -06:00
9f421bfd6d Add landing page source code 2020-12-27 19:18:42 -06:00
3a4071505e Update issue templates 2020-12-27 17:43:20 -06:00
344c4a324c Update README.md 2020-12-27 17:41:01 -06:00
0aca118546 Update bug_report.md 2020-12-27 17:25:34 -06:00
124c490f25 Update issue templates 2020-12-27 17:23:08 -06:00
0a5622c78e Simplify all command and convert them to Kotlin 2020-12-26 22:22:04 -06:00
373f21e247 Simplify CommandRunner and convert it to Kotlin 2020-12-26 22:01:23 -06:00
e80292e75d NumberButtonView: Display missing data as question marks 2020-12-26 12:14:18 -06:00
7173381d9b Rename Entries to EntryList 2020-12-26 11:59:27 -06:00
78f31a65d4 Remove EntryList 2020-12-26 11:54:05 -06:00
2e19fee83c Replace invalidateNewerThan by recompute; add newComputedEntries 2020-12-25 13:28:52 -06:00
f6754ff180 Implement Entries.getValues 2020-12-25 13:14:36 -06:00
3f74c77755 Replace RepetitionList by Entries 2020-12-24 20:35:33 -06:00
c904e22c0f Implement SQLiteEntries; rename RepetitionRecord to EntryRecord 2020-12-24 12:51:58 -06:00
27023e50ae HistoryEditorDialog: Listen to commands 2020-12-24 11:15:22 -06:00
0f2f010f94 EditHabitCommand: Notify listeners 2020-12-24 10:49:28 -06:00
cf2989d587 Refactor Habit 2020-12-24 10:41:01 -06:00
94c78ebb72 Write cleaner version of EntryList 2020-12-24 09:43:03 -06:00
d9be39b839 Remove MemoryRepetitionList 2020-12-23 19:56:34 -06:00
7fcad7b5c5 Remove MemoryEntryList 2020-12-23 19:47:41 -06:00
cfeef3651f Remove ModelObservable from EntryList 2020-12-23 19:25:42 -06:00
e849e8a5c2 Remove ModelObservable from RepetitionList 2020-12-23 19:17:54 -06:00
5bd21e68df Rename CheckmarkList to EntryList 2020-12-23 19:12:26 -06:00
71597ca89b Rename Checkmark to Entry 2020-12-23 19:08:31 -06:00
a3cf2877b8 Unify Checkmarks and Repetitions 2020-12-23 18:40:20 -06:00
23e9ccb236 Convert Repetition to Kotlin 2020-12-23 18:09:38 -06:00
7d97554cb1 Convert Checkmark to Kotlin 2020-12-23 17:59:09 -06:00
5f8c0d67b8 Convert AppScope to Kotlin 2020-12-23 17:45:12 -06:00
b468325f64 Replace Config.java by Constants.kt 2020-12-23 17:44:38 -06:00
39d23424d6 Remove CancelableTask 2020-12-23 15:51:45 -06:00
eba2dd0171 Remove HabitsActivity 2020-12-23 15:16:32 -06:00
1bdd44085c Clean up and update dependencies 2020-12-23 14:26:07 -06:00
596af6afe6 Remove android-base; move Dagger classes to uhabits.inject 2020-12-23 13:43:42 -06:00
3f3ddc3955 Remove BaseActivity and BaseScreen 2020-12-23 13:31:13 -06:00
a58c60b8ce Remove BaseRootView 2020-12-23 13:06:29 -06:00
b42ad0dd83 Refactor SettingsActivity; clean up BaseScreen 2020-12-23 12:50:14 -06:00
e0fbe841c1 Remove BaseSelectionMenu 2020-12-23 12:43:59 -06:00
3523b2c1a3 Remove BaseMenu 2020-12-23 12:23:23 -06:00
c15c14ffcd Simplify SyncActivity; make QR code always white 2020-12-23 11:27:59 -06:00
8cd729480f Remove ButterKnife 2020-12-23 11:18:25 -06:00
638bc2816f Refactor AboutActivity 2020-12-23 11:12:32 -06:00
826ea17cdd Refactor EditSettingActivity 2020-12-23 10:53:00 -06:00
19e221bb32 ShowHabitActivity: Re-enable menus and actions 2020-12-23 10:24:20 -06:00
85de69bca7 Remove unused HabitCard 2020-12-23 08:18:46 -06:00
7d5b9d0f63 Refactor BarCard 2020-12-23 08:15:40 -06:00
816ab71d83 Refactor HistoryCard 2020-12-22 20:09:00 -06:00
c230b5c40d Fix score widget name 2020-12-22 19:45:48 -06:00
71620a320d Refactor FrequencyCard 2020-12-22 19:41:38 -06:00
c016b0aecc Refactor ScoreCard 2020-12-22 19:21:05 -06:00
95b3028c95 Refactor StreakCard 2020-12-22 16:32:31 -06:00
ae4ac801a0 Restructure ShowHabitActivity 2020-12-22 16:17:40 -06:00
bda3e42e2b Create view-model and presenter for TargetCard; reduce boilerplate 2020-12-22 12:59:44 -06:00
4dc1df5887 Refactor TargetCard 2020-12-22 12:05:51 -06:00
302b9f5df4 Refactor SubtitleCard 2020-12-22 11:37:06 -06:00
c2d89c7a60 Refactor NotesCard 2020-12-22 10:37:49 -06:00
45574753c7 ShowHabitPresenter: Listen to commands and auto-update 2020-12-22 10:23:07 -06:00
c84c618ef0 Refactor OverviewCard 2020-12-22 10:07:45 -06:00
98d17d60a5 Refactor ShowHabitRootView; convert ShowHabitActivity to Kotlin 2020-12-22 09:17:39 -06:00
4c1c6e76fc Remove unused methods 2020-12-21 21:51:49 -06:00
ac1441aba5 Simplify commands 2020-12-21 21:49:12 -06:00
5d2ff40dc9 Replace primitive int by PaletteColor 2020-12-21 21:36:35 -06:00
63f2b80515 Remove AndroidDateUtils 2020-12-21 20:41:01 -06:00
52b25fbc72 Remove AndroidDateFormats 2020-12-21 20:29:41 -06:00
b94a887534 Remove redundant logError method 2020-12-21 20:25:48 -06:00
f6699fbfda Move SyncManager to uhabits-core 2020-12-21 18:20:43 -06:00
9743b05a78 Move sync package to org.isoron.uhabits.core 2020-12-21 17:13:08 -06:00
9681b7b5ef RemoteSyncServer: Improve logging 2020-12-21 17:08:55 -06:00
017bc50698 Move sync classes to uhabits-core 2020-12-21 17:08:55 -06:00
1e94456a74 Add server metrics 2020-12-21 17:08:55 -06:00
2fcba80f3a Server: Implement temporary links 2020-12-21 17:08:55 -06:00
fc4cbe84f0 Update README.md 2020-12-09 20:39:22 -06:00
011abf62a0 Bump version to 1.8.11 2020-12-09 20:01:35 -06:00
Sunxy88
9c96857262 Use dark theme in settings window. (#655) 2020-12-09 19:57:03 -06:00
4f55ec6ea8 Bump version number 2020-11-29 16:16:27 -06:00
8139088b39 Update README.md 2020-11-29 15:30:37 -06:00
44f7d13449 Include pre-release badge 2020-11-29 15:30:22 -06:00
16b0682229 Ignore all performance tests 2020-11-29 15:05:28 -06:00
a77798f293 PerformanceTest: Increase time limit 2020-11-29 13:38:09 -06:00
08050ff616 WidgetUpdater: Remove rate limit 2020-11-29 13:07:17 -06:00
12b080152b Speed up CreateHabitCommand and CreateRepetitionCommand 2020-11-29 12:46:01 -06:00
df3d660e83 SyncActivity: Remove password field 2020-11-29 07:19:40 -06:00
4908709296 Merge branch 'feature/sync' into dev 2020-11-29 07:12:12 -06:00
5717ae1bf1 RemoteSyncServer: Fix test 2020-11-29 07:11:38 -06:00
872c8d9d81 SyncManager: Small fix in logging 2020-11-29 06:47:18 -06:00
0b6110f0f9 Add alpha to version name 2020-11-28 22:29:24 -06:00
6df5e9ebe9 Monitor network availability; other minor fixes 2020-11-28 22:28:54 -06:00
2b9fd74a1d Close database 2020-11-28 22:28:46 -06:00
4a4b3c6aeb Server: change dir structure 2020-11-28 22:27:55 -06:00
7979f74bea Server: data persistence 2020-11-28 16:23:21 -06:00
b0336fb495 SyncManager: Log sync key 2020-11-28 16:22:33 -06:00
328fcd23f4 SyncManager: Run tasks in the same thread 2020-11-28 11:37:35 -06:00
9c0951ae58 Minor fixes to sync protocol 2020-11-28 11:32:28 -06:00
3f51561271 GitHub Actions: Upload only build outputs 2020-11-28 10:10:01 -06:00
1787c0e74e Upgrade to Android Gradle plugin 4.1.0 2020-11-28 10:06:53 -06:00
49faacda1c Wrap base64 functions; close gzip stream before reading 2020-11-28 09:44:45 -06:00
339eeff1ff Merge branch 'dev' into feature/sync 2020-11-28 08:55:12 -06:00
849212fd2f Run medium tests three times 2020-11-28 08:48:55 -06:00
356b2b06e4 Update README.md 2020-11-27 18:58:02 -06:00
b6eefbdb36 setSystemTime: Try two methods 2020-11-27 18:35:52 -06:00
2a72601153 Increase minSdkVersion to 23 2020-11-27 18:22:44 -06:00
2bf7358207 Fix medium tests for Android APIs 23-25 2020-11-27 18:00:56 -06:00
8c6e2ef461 GitHub Actions: Test multiple Android versions 2020-11-27 17:32:01 -06:00
ce0cbb6ee2 Sync: Improve encryption and preferences API 2020-11-27 10:55:55 -06:00
67ef3bb90c SyncManager: Switch to coroutines 2020-11-27 09:13:17 -06:00
b82af419f8 Merge branch 'dev' into feature/sync 2020-11-26 23:56:53 -06:00
49ff9a7edf Fix failing tests 2020-11-26 23:47:40 -06:00
53ebdf4f14 Skip upload if database has not changed 2020-11-26 23:43:47 -06:00
4762b54701 Merge branch 'dev' into feature/sync 2020-11-26 15:39:44 -06:00
aa288ac406 Make question marks optional
Fixes #96
2020-11-26 15:36:44 -06:00
2228dbf0f4 Create new UNKNOWN checkmark state 2020-11-26 15:08:49 -06:00
9ca1c8e459 Rewrite WidgetBehavior and associated tests 2020-11-26 14:19:15 -06:00
61414d62f4 Remove calls to Repetition.add and Repetition.remove 2020-11-26 14:19:02 -06:00
f97fed3b9b Repetition: Replace toggle by setValue 2020-11-26 13:29:12 -06:00
d45281d137 Merge branch 'master' into dev 2020-11-26 08:59:52 -06:00
1bb6ad41b2 Merge branch 'hotfix/1.8.10' 2020-11-26 08:22:50 -06:00
56c180183e Update release notes 2020-11-26 08:22:37 -06:00
af8d983cca Add dummy settings.gradle file to help F-Droid locate app metadata 2020-11-26 08:20:10 -06:00
0a49232ebd Add dummy settings.gradle file to help F-Droid locate app metadata 2020-11-26 08:11:40 -06:00
cff8e26428 Update translations 2020-11-25 22:33:41 -06:00
e892bccb32 Bump version to 1.8.10 2020-11-25 18:23:27 -06:00
68ccf37fd5 Add UUID to habits 2020-11-24 08:28:16 -06:00
659c528744 SyncManager: First version 2020-11-24 06:55:37 -06:00
b1560dd694 LoopDBImporter: Use commands instead of directly modifying DB 2020-11-24 06:54:28 -06:00
0de86ac66c Update widgets at most once per minute 2020-11-24 06:53:20 -06:00
06e5d517cc Downgrade Ktor 2020-11-24 06:51:34 -06:00
35ca041bc2 EncExt: Trim keys 2020-11-24 06:51:08 -06:00
576a334dc9 Update sync intent-filter 2020-11-24 06:32:21 -06:00
294aee5d12 Implement cryptography extensions 2020-11-22 22:39:22 -06:00
0859cec853 Implement intent filter; hide password for now 2020-11-22 17:00:37 -06:00
23f2978a64 Add sync preferences to settings screen 2020-11-22 15:39:08 -06:00
a2400172e2 Make registration functional 2020-11-22 13:00:59 -06:00
5376f4bff8 Implement SyncActivity (with static data) 2020-11-22 10:07:34 -06:00
0497890cb0 Update docker registry URL 2020-11-22 10:02:53 -06:00
2848c4e77b Server: Implement get version 2020-11-22 09:49:35 -06:00
8fa3ba1b18 Add docker tasks to gradle 2020-11-21 20:49:48 -06:00
b4f36dd258 Initial version of Ktor sync server 2020-11-21 20:12:14 -06:00
008902d3b7 AutoBackup: Use getLocalTime instead of getStartOfToday; improve logging 2020-11-21 10:12:52 -06:00
4764c07f3b Bump version to 2.0.0 2020-11-19 19:29:26 -06:00
8f0cfa8614 Update CHANGELOG.md 2020-11-19 19:27:27 -06:00
865e1969e6 Update CHANGELOG 2020-11-19 19:22:10 -06:00
Quentin Hibon
bfddc42f5e Allow user to sort by status (#660) 2020-11-19 19:05:21 -06:00
dc0b8deccf Export backups daily
Fixes #178
2020-11-19 18:31:28 -06:00
b674d14b49 Opt-in skips: Update tests 2020-11-18 22:26:45 -06:00
d594d3b085 Make skip days an opt-in feature 2020-11-18 22:13:03 -06:00
bef85bf93a CHANGELOG: Minor fixes 2020-11-18 07:16:17 -06:00
76eaefc95b Merge branch 'master' into dev 2020-11-18 07:11:45 -06:00
83c1ab35d5 GH Actions: Update publish.yml 2020-11-18 06:57:22 -06:00
7a6563736a Merge branch 'hotfix/1.8.9' 2020-11-18 06:47:44 -06:00
55c50c1119 Update CHANGELOG 2020-11-18 06:47:29 -06:00
ba08968600 Fix tests 2020-11-18 06:45:47 -06:00
Sunxy88
2d488a67f2 Use dark theme in settings window. (#655) 2020-11-14 07:57:07 -06:00
Kristian Tashkov
d997b1378d Setting custom start of the day (#621) 2020-09-19 19:23:00 -05:00
720f98f9bd Write tests for IntentScheduler 2020-09-19 19:11:57 -05:00
ddea9e78a9 ScoreList: Fix interaction between SKIP and rolling sum 2020-09-16 07:38:59 -05:00
c429cb41c0 Fix method rename 2020-09-15 22:32:46 -05:00
ae286cec14 Take frequency into account when computing score for numerical habits 2020-09-15 22:30:44 -05:00
31d631b155 Update test screenshots 2020-09-15 22:30:44 -05:00
20142d5f94 Reduce time required to form non-daily habits; smooth out irregular schedules 2020-09-15 22:30:44 -05:00
ef186d55c6 Update test screenshots 2020-09-15 22:30:44 -05:00
8b847ae9fa ScoreList: Use rolling sum method also for boolean habits
See #641
2020-09-15 22:30:44 -05:00
Kristian Tashkov
a4ef657897 Make skips freeze score (#630) 2020-09-13 17:01:15 -05:00
f44556e281 ScoreList: Use rolling sum for non-daily numerical habits 2020-09-12 21:40:59 -05:00
8a895b2d20 Fix colors in BarChart and HistoryChard 2020-09-12 16:09:12 -05:00
61f32449dd Numerical habits: allow Tasker to increment/decrement value 2020-09-12 15:10:46 -05:00
Kristian Tashkov
07f8583c3d Don't show reminders from archived habits (#639) 2020-09-12 13:15:23 -05:00
Kristian Tashkov
69f11c9d4e Fix clearing of reminders (#638) 2020-09-12 12:47:03 -05:00
Nguyen Ly Nam
1ffc079042 Numerical habits: update notifications and detail screen (#627) 2020-09-11 17:32:20 -05:00
5fa3f412c0 Show YES_AUTO as grey checkmark
This reverts a change introduced recently where YES_AUTO (previously CHECKED_IMPLICITLY)
was shown as a grey dash.
2020-09-05 18:46:48 -05:00
b72cad5316 Rename checkmark values to NO, YES_AUTO, YES_MANUAL and SKIP
This makes the source code consistent with the user interface.
2020-09-05 18:04:04 -05:00
Kristian Tashkov
d59ab89426 Update widgets at midnight (#634) 2020-09-05 17:25:46 -05:00
ea019321e6 Revert "NumberPickerFactory: Show and hide keyboard using InputMethodManager"
This reverts commit 6967def950. InputMethodManager method
does not work reliably on widgets. It also cannot reliably hide the keyboard.
2020-09-03 22:22:07 -05:00
6967def950 NumberPickerFactory: Show and hide keyboard using InputMethodManager
In about 1 every 10 attempts, the previous solution randomly failed to show
the keyboard, although the text field was focused. This solution seems more reliable.
2020-09-03 21:55:03 -05:00
6d4cac427f NumberPickerFactory: Automatically show keyboard 2020-09-03 21:06:46 -05:00
152b2d5427 Merge pull request #631 from KristianTashkov/habit_selection_dark_theme
Fix habit selection menu item background color
2020-09-02 08:09:26 -05:00
9d28fbe7b5 ScoreList: Revert recent changes to computation of scores 2020-09-02 07:01:54 -05:00
c846dfc75a Make skips equivalent to implicit checks; make their visual representation consistent 2020-09-01 22:23:42 -05:00
ee7eb4ef51 build.sh: Always use GRADLE variable 2020-09-01 22:22:38 -05:00
KristianTashkov
57bfe3d801 Fix habit selection menu item background color 2020-09-01 15:53:30 +03:00
a5ee96f988 HistoryChart: Make skipped days a bit more clear 2020-08-23 15:09:13 -05:00
7b0eddeac5 Set minimum widget size 2020-08-23 14:48:58 -05:00
e8e52db9b1 HabitPickerDialog: Show "no habits found" message 2020-08-23 14:39:11 -05:00
cddbf558e6 Reactivate widget view tests; update widget previews 2020-08-23 14:09:50 -05:00
79459c373e Manage exceptions for when activities don't exist to handle intents
Fixes #181
2020-08-23 08:57:00 -05:00
84523869e8 Manage exceptions for when activities don't exist to handle intents
Fixes #181
2020-08-23 08:43:22 -05:00
590298bf5b MemoryHabitList: Inherit parent's order
Fixes #598
2020-08-23 07:43:20 -05:00
8067fd5313 MemoryHabitList: Inherit parent's order
Fixes #598
2020-08-23 07:41:42 -05:00
Christoph Hennemann
d2dc756a34 Improve readability of history and streak charts
Fixes #432

Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-22 23:37:43 -05:00
2af1dbf3a6 Reactivate HistoryChart tests; fix IndexOutOfBoundsException 2020-08-22 19:42:46 -05:00
ebab6f08ee Remove obsolete regression test 2020-08-22 19:04:29 -05:00
4a2b21855a Update ListHabitsRegressionTest 2020-08-22 19:04:11 -05:00
42d5edec26 WidgetTest: Tap twice to remove checkmark 2020-08-22 18:50:39 -05:00
f368e43158 CreateRepetitionCommand: Run update() after executing 2020-08-22 18:27:12 -05:00
09eb8c9f4d Fix widget tests on API 29+ 2020-08-22 17:52:53 -05:00
209e709163 Make widgets fully opaque by default 2020-08-22 16:26:59 -05:00
d20a2be7e6 Remove obsolete test screenshots 2020-08-22 15:58:26 -05:00
bd68f8fc5a Revert changes to HistoryCard view screenshots 2020-08-22 15:56:24 -05:00
KristianTashkov
1a05f7d85d Allow user to skip days without breaking streak
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-22 15:35:35 -05:00
TacoTheDank
d9ff429c28 Deprecation fixes
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-22 12:14:35 -05:00
3554895a5d Widgets: Show shadow if widget is completely opaque 2020-08-18 08:09:12 -05:00
16491c142a Widgets: Fix title size 2020-08-18 08:00:38 -05:00
859fea5ff5 Hide streaks for numerical habits 2020-08-18 07:57:57 -05:00
34c73e89db Merge branch 'hotfix/1.8.9' into dev 2020-08-15 15:18:21 -05:00
09bf49a9ce Remove notification groups; revert to default system behavior 2020-08-15 14:45:40 -05:00
48e43869c7 Merge branch 'hotfix/1.8.9' into dev 2020-08-15 14:18:50 -05:00
963fb58309 Revert changes to android-pickers 2020-08-15 13:58:03 -05:00
38fb37cde2 Remove SyncManager and Internet permission 2020-08-15 13:54:29 -05:00
d0b4e3e163 Bump version to 1.8.9 2020-08-15 13:35:48 -05:00
3ef3be4d16 Tidy up strings.xml 2020-08-15 12:47:32 -05:00
bae0e3bcc1 Remove unused resources 2020-08-15 12:45:34 -05:00
3e99d821a5 Allow user to sort habits in reverse order
Closes #556, closes #497
2020-08-15 12:29:49 -05:00
olegivo
acb5051eec Konvert BaseActivity
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-15 11:46:13 -05:00
olegivo
b76882dd1d Konvert BaseMenu
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-15 11:41:19 -05:00
olegivo
978946baab Konvert BaseSelectionMenu
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-15 11:38:41 -05:00
olegivo
d202f14c14 Konvert BaseScreen
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-15 11:36:03 -05:00
olegivo
17a85e517a Konvert BaseRootView
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-13 07:53:37 -05:00
olegivo
c5bc5deff0 Konvert ActivityScope
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-13 07:44:07 -05:00
olegivo
b7f04957a5 Konvert ActivityContext
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-13 07:43:19 -05:00
olegivo
b0f5f96eee Konvert StyledResources
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-13 07:40:49 -05:00
olegivo
fd76a3c6fd Konvert InterfaceUtils
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-08-13 07:32:41 -05:00
b31482881b Merge pull request #608 from KristianTashkov/kris/fix_yes_no
Only save numerical habit features if the habit is numerical
2020-08-04 07:29:50 -05:00
KristianTashkov
87231d7fa4 fix saving of non-numerical habits 2020-07-20 13:12:58 +03:00
olegivo
4d18a1335c Convert FileUtils to Kotlin
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-07-12 10:22:18 -05:00
olegivo
424a417a13 Convert ColorUtils to Kotlin
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-07-12 10:00:23 -05:00
Thomas S
96d23bdf22 Update checkmark widget for numerical support
Co-authored-by: Alinson S. Xavier <git@axavier.org>
2020-07-12 09:25:49 -05:00
a8e77b8df8 Update test screenshots 2020-07-02 08:04:03 -05:00
5413569ce3 Update test screenshots 2020-07-02 07:31:02 -05:00
d80b85ac8c Make bars round 2020-06-25 07:16:47 -05:00
40bc35935f Create target widget 2020-06-25 07:04:43 -05:00
a6060f468d Create new TargetCard and TargetChart 2020-06-25 06:12:26 -05:00
6ec9d51a1e CheckmarkList: Implement getThisIntervalValue 2020-06-24 20:07:56 -05:00
de28a5e74e EditHabitActivity: Do not divide target by freq denominator 2020-06-24 20:07:21 -05:00
3ba503604b Show target in SubtitleCard; replace some bitmap icons by FontAwesome 2020-06-23 06:19:08 -05:00
6d48b53861 Merge branch 'master' into dev 2020-06-21 17:28:41 -05:00
0b7697d172 Make save button functional for numerical habits 2020-06-20 08:39:55 -05:00
b9850fa085 Create form for numerical habits 2020-06-20 07:45:38 -05:00
ecb3978bdd Fix dialog animations 2020-06-19 20:57:35 -05:00
fc57a9db6c Merge branch 'feature/numerical' into dev 2020-06-19 07:50:50 -05:00
6c9c2a6c1a Update tests 2020-06-19 07:48:40 -05:00
3e0529d515 Remove old EditHabitDialog 2020-06-19 06:59:16 -05:00
7d8d89fbbd EditHabitActivity: Adjust inputType 2020-06-19 06:58:36 -05:00
c43f3c2fd7 EditHabitActivity: Dismiss all fragments on device rotation 2020-06-19 06:39:21 -05:00
403ed8b250 EditHabitActivity: Make save button functional 2020-06-19 06:24:51 -05:00
9ccb2b2737 Implement reminder day picker 2020-06-18 22:19:59 -05:00
424a282847 Update gitignore 2020-06-18 07:45:19 -05:00
309b6cbcaf Implement reminder time picker; customize picker color 2020-06-18 07:43:58 -05:00
72ad14119a Create HabitTypeDialog 2020-06-17 07:00:25 -05:00
Alex Johnson
652ed50d09 Reset habit strength graph scroll location when switching scale
- Create ScrollableChart.reset() to set x coordinate of scroller
- Call reset() from doInBackground() in ScoreCard to reset scroll location
2020-06-16 20:49:14 -07:00
6070a7af2e Merge branch 'dev' into edit-redesign 2020-06-16 07:19:57 -05:00
8fd8c2802b Remove AboutBehavior and AboutModule 2020-06-16 06:44:28 -05:00
923b923745 build.sh: Remove .gradle directory when cleaning project 2020-06-16 06:43:38 -05:00
59c8031372 Minor style changes 2020-06-15 08:27:48 -05:00
0058089e7d Remove redundant repositories section 2020-06-15 08:27:31 -05:00
d5a840388c Merge branch 'dev' into 2kotlin-androidbase 2020-06-15 08:00:34 -05:00
4b07d7d5b1 Fix build script; remove some obsolete tests 2020-06-15 07:59:35 -05:00
2fffc25128 Merge pull request #585 from olegivo/update-agp 2020-06-15 06:19:27 -05:00
4a4501276c Merge pull request #590 from Gelma/typos
Fix typos
2020-06-15 06:16:54 -05:00
Andrea Gelmini
c8e3735dd6 Fix typos 2020-06-13 18:25:05 +02:00
olegivo
61267e40e7 konvert SSLContextProvider 2020-06-04 11:56:03 +03:00
olegivo
c0b664e1e4 konvert BaseExceptionHandler 2020-06-04 11:56:03 +03:00
olegivo
e57c319658 konvert @AppContext 2020-06-04 11:56:03 +03:00
olegivo
e54ba826b3 konvert AndroidDirFinder
remove if-null condition cause ContextCompat.getExternalFilesDirs is @NonNull
2020-06-04 11:56:03 +03:00
olegivo
9b8784b4c4 AndroidBugReporter: more idiomatic kotlin 2020-06-04 11:56:03 +03:00
olegivo
51a7b7a7d4 konvert AndroidBugReporter 2020-06-04 11:56:03 +03:00
olegivo
d761b474cf add kotlin support for android-base project 2020-06-04 11:56:03 +03:00
olegivo
51be585b9d update AGP (4.0.0) 2020-06-04 11:14:52 +03:00
olegivo
76be5037fd update AGP (3.6.3) 2020-05-18 17:37:39 +03:00
aee0da2c64 Merge branch 'feature/kn-update' into dev 2020-05-17 14:54:36 -05:00
f1610e6603 core: Skip BaseViewTests on iOS 2020-05-17 14:54:02 -05:00
a7a1766809 core: update gradle, rename iOS framework 2020-05-17 14:44:00 -05:00
5f83314d56 Fix format method on JVM and JS 2020-05-17 13:33:22 -05:00
c784f40c55 Remove custom iosTest task; fix IosDatabase 2020-05-17 13:28:52 -05:00
6a172d135b Update to K/N 1.3.72; remove i18n classes; rewrite sprintf 2020-05-17 11:47:13 -05:00
13f4981066 Merge pull request #547 from recheej/rechee/add_notes
Add Notes to Habits.
2020-03-01 15:11:38 -05:00
Rechee Jozil
849b91dde2 delete bad unit test 2020-02-01 11:08:32 -08:00
Rechee Jozil
66b4c48d92 null check description 2020-02-01 11:08:06 -08:00
Rechee Jozil
2e64da4cac using wildcard imports 2020-02-01 11:03:14 -08:00
323ddcc11a Implement FrequencyPickerDialog 2020-01-20 06:08:29 -06:00
175000efd1 Follow current theme; implement color switching 2020-01-12 11:54:15 -06:00
6f94fc48c1 First version of EditHabitActivity 2020-01-12 10:20:36 -06:00
Rechee
18d1d0d9f7 fixed screenshot tests 2020-01-09 19:49:14 -08:00
Rechee
47edea47ae creating UI test for blank description 2020-01-08 20:35:45 -08:00
Rechee
1714cf8050 added create habit test for description 2020-01-08 20:16:43 -08:00
Rechee
7366e9a47f add blank habit test 2020-01-08 20:04:11 -08:00
Rechee
e58589cfbd adding description to test 2020-01-08 20:02:38 -08:00
Rechee
2999e0e5eb updating test 2020-01-08 19:50:17 -08:00
Rechee
fa7bc27124 add test for notes Card 2020-01-08 19:36:54 -08:00
Rechee
f5be9d3c67 introduced notes card to support refresh 2020-01-08 19:25:23 -08:00
Rechee
2c46e8909a now showing notes in show habits 2020-01-08 18:57:47 -08:00
Rechee
8b042f30dc displaying subtitle card UI in designer
squash! displaying subtitle card UI in designer
2020-01-08 18:39:30 -08:00
Rechee
46761926d2 now writing question and description to csv 2020-01-08 17:59:26 -08:00
Rechee
88d6a8e513 fix habit importers to use description instead 2020-01-08 17:52:52 -08:00
Rechee
557ae19297 setting description to be blank instead of null 2020-01-08 17:45:55 -08:00
Rechee
9c10a56dda setting question label in subtitle 2020-01-07 22:25:14 -08:00
Rechee
895b068321 fixing tests 2020-01-07 21:32:18 -08:00
Rechee
fb98c5fe9a replacing getDescription with getQuestion all over the code 2020-01-07 20:39:23 -08:00
Rechee
0ec604f21e fix formatting 2020-01-07 20:34:18 -08:00
Rechee
bcd9dd1bb5 now allowing blank for description
squash! now allowing blank for description
2020-01-07 20:33:39 -08:00
Rechee
61bcd253f8 fully implementing question & description in UI and code 2020-01-07 20:22:35 -08:00
Rechee
fb40dbdabc edit name description panel xml 2020-01-07 20:02:55 -08:00
Rechee
0990192cd6 making nullable 2020-01-06 17:46:48 -08:00
Rechee
1cf2d69534 creating migration tests 2020-01-06 17:40:11 -08:00
Rechee
0489dc39e0 updating db version and adding migration for question column 2020-01-06 12:46:05 -08:00
Rechee
88b9645be1 adding question to habit and habit record 2020-01-06 12:36:25 -08:00
1665 changed files with 38857 additions and 45713 deletions

30
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,30 @@
---
name: Bug report
about: Report something broken in the app
title: ''
labels: ''
assignees: ''
---
## Pre-submission checklist
- [ ] I am submitting a bug report, not a feature request.
- [ ] I am running the latest version of Loop Habit Tracker.
- [ ] I have have searched for similar issues, but did not find any matches.
## Description
A clear and concise description of what the problem is.
## Steps to reproduce
1. Go to ...
2. Click on ....
3. Scroll down to ....
4. See error
## Screenshots
If applicable, add screenshots to help explain your problem.
## System information
- Phone: [e.g. Google Pixel 4]
- Phone Operating System: [e.g. Android 10]
- App version: [e.g. 1.8.9]

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Feature requests
url: https://github.com/iSoron/uhabits/discussions/categories/feature-requests?discussions_q=category%3A%22Feature+Requests%22+sort%3Atop
about: Submit ideas for new features and for improving existing features
- name: Help & FAQ
url: https://github.com/iSoron/uhabits/discussions/categories/help-faq
about: Ask questions about using the app or setting up the project

6
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "daily"

View File

@@ -1,31 +1,60 @@
name: Build & Test
on:
push:
branches:
- dev
pull_request:
branches:
- dev
paths-ignore:
- '**.md'
push:
paths-ignore:
- '**.md'
jobs:
build:
runs-on: macOS-latest
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Check out source code
uses: actions/checkout@v1
- name: Install Java Development Kit 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build APK & Run small tests
run: android/build.sh build
- name: Run medium tests
uses: ReactiveCircus/android-emulator-runner@v2.2.0
- name: Build Project
run: ./build.sh build
- name: Upload Build Artifacts
uses: actions/upload-artifact@v2
with:
api-level: 29
script: android/build.sh medium-tests
- name: Upload artifacts
uses: actions/upload-artifact@v1
name: uhabits-android
path: uhabits-android/build/outputs/
AndroidTest:
needs: Build
runs-on: macOS-10.15
timeout-minutes: 60
strategy:
matrix:
api: [
23,
24,
25,
26,
27,
28,
# 29, # Crashes constantly, see: https://issuetracker.google.com/issues/159732638
# 30, # Not available yet
# 31, # Not available yet
]
steps:
- name: Check out source code
uses: actions/checkout@v1
- name: Download Previously Built APK
uses: actions/download-artifact@v2
with:
name: Build
path: android/uhabits-android/build/outputs/
name: uhabits-android
path: uhabits-android/build/outputs/
- name: Run Android Tests
run: ./build.sh android-tests ${{ matrix.api }}

View File

@@ -1,40 +0,0 @@
name: Build, Test & Publish
on:
push:
branches:
- master
jobs:
build:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- name: Install GPG
uses: olafurpg/setup-gpg@v2
- name: Decrypt secrets
env:
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
run: .secret/decrypt.sh
- name: Install Java Development Kit 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build APK & Run small tests
env:
RELEASE: 1
run: android/build.sh build
- name: Run medium tests
uses: ReactiveCircus/android-emulator-runner@v2.2.0
env:
RELEASE: 1
with:
api-level: 29
script: android/build.sh medium-tests
- name: Upload build to GitHub
uses: actions/upload-artifact@v1
with:
name: Build
path: android/uhabits-android/build/outputs/
- name: Upload APK to Google Play
run: cd android && ./gradlew publishReleaseApk

6
.gitignore vendored
View File

@@ -4,6 +4,7 @@
*.perspectivev3
*.swp
*~.nib
*.hprof
.DS_Store
._.DS_Store
.externalNativeBuild
@@ -16,3 +17,8 @@ captures
local.properties
node_modules
*xcuserdata*
*.sketch
/design
/releases
/screenshots
crowdin.yml

View File

@@ -1,205 +1,289 @@
# Changelog
### 1.8.8 (June 21, 2020)
## [2.0.2] - 2021-05-23
* Make small changes to the habit scheduling algorithm, so that "1 time every x days" habits work more predictably.
* Fix crash when saving habit
### Changed
- Make checkmark widget resizable
### 1.8.0 (Jan 1, 2020)
### Fixed
- Fix crash caused by numerical habits with zero target (@iSoron, #903)
- Fix small issues with font size (@iSoron)
- Allow fractional target values (@sumanabhi, #911)
- Fix IllegalStateException in androidx.customview.view (@iSoron, #906)
- Fix crash when selecting habit frequency in some languages (@iSoron, #926)
- Fix IllegalArgumentException in RingView (@iSoron, #904)
* New bar chart showing number of repetitions performed in each week, month, quarter or year.
* Improved calculation of streaks for non-daily habits: performing habits on irregular weekdays will no longer break your streak.
* Many more colors to choose from (now 20 in total).
* Ability to customize how transparent the widgets are on your home screen.
* Ability to customize the first day of the week.
* Yes/No buttons on notifications, instead of just "Check".
* Automatic dark theme according to phone settings (Android 10).
* Smaller APK and backup files.
* Many other internal code changes improving performance and stability.
## [2.0.1] - 2021-05-09
### 1.7.11 (Aug 10, 2019)
### Added
- Make midnight delay optional and disabled by default (@hiqua)
- Add arrows to sort menu (@iSoron)
* Fix bug that produced corrupted CSV files in some countries
### Removed
- Temporarily remove experimental device sync functionality. This feature will be re-added in
Loop 2.1.
### 1.7.10 (June 15, 2019)
### Changed
- Make implicit checkmarks easier to read (@iSoron)
- Update and improve list of translators (@hiqua, @iSoron)
* Fix bug that prevented some devices from showing notifications.
* Update targetSdk to Android Pie (API level 28)
### Fixed
- Disable transparency for stacked widgets (@hiqua)
- Fix various color issues on the dark theme (@hiqua, @iSoron)
- Fix "customize notifications" on older devices (@hiqua)
- Fix snooze button in notifications when device is locked (@hiqua)
- Fix a crash when deleting habits (@engineering4good)
- Fix checkmark widget not rendering properly on some Samsung phones (@iSoron)
### 1.7.8 (April 21, 2018)
### Refactoring & Testing
- Finish conversion of the entire project to Kotlin (@hiqua, @iSoron, @MarKco)
- Automatically run large tests on GitHub Actions (@iSoron)
- Remove unused v21 resources (@hiqua)
* Add support for adaptive icons (Oreo)
* Add support for notification channels (Oreo)
* Update translations
## [2.0.0-alpha] - 2020-11-29
### 1.7.7 (September 30, 2017)
### Added
- Track numeric habits (@iSoron, @namnl)
- Skip days without breaking streak (@KristianTashkov)
- Sort habits by status (@hiqua)
- Sort habits in reverse order (@iSoron)
- Add notes to habits (@recheej)
- Improve readibility of charts (@chennemann)
- Delay new day until 3am (@KristianTashkov)
- Export backups daily (@iSoron)
* Fix bug that caused reminders to show repeatedly on DST changes
### Removed
- Drop support to devices older than Android 6.0 (API 23)
### 1.7.6 (July 18, 2017)
### Fixed
- Reset chart offset when switching scale (@alxmjo)
- Don't show reminders from archived habits (@KristianTashkov)
- Lapses on non-daily habits decrease the score too much (@iSoron)
- Update widgets at midnight (@KristianTashkov)
* Fix bug that caused widgets not to render sometimes
* Fix other minor bugs
* Update translations
### Refactoring
- Convert files to Kotlin (@olegivo)
### 1.7.3 (May 30, 2017)
## [1.8.12] - 2021-01-30
* Improve performance of 'sort by score'
* Other minor bug fixes
- Fix bug that caused incorrect check marks to show after scrolling (#713)
- Fix issue preventing widgets from updating at midnight (#680)
### 1.7.2 (May 27, 2017)
## [1.8.11] - 2020-12-29
* Fix crash at startup
- Fix theme issues on Xiaomi phones
### 1.7.1 (May 21, 2017)
## [1.8.10] - 2020-11-26
* Fix crash (BadParcelableException)
* Fix layout for RTL languages such as Arabic
* Automatically detect and reject invalid database files
* Add Hebrew translation
- Update translations
### 1.7.0 (Mar 31, 2017)
## [1.8.9] - 2020-11-18
* Sort habits automatically
* Allow swiping the header to see previous days
* Import backups directly from Google Drive or Dropbox
* Refresh data automatically at midnight
* Other minor bug fixes and enhancements
- Manage exceptions when activities don't exist to handle intents (#181)
- MemoryHabitList: Inherit parent's order (#598)
- Remove notification groups; revert to default system behavior
- Remove SyncManager and Internet permission
### 1.6.2 (Oct 13, 2016)
## [1.8.8] - 2020-06-21
* Fix crash on Android 4.1
- Make small changes to the habit scheduling algorithm, so that "1 time every x days" habits work more predictably.
- Fix crash when saving habit
### 1.6.1 (Oct 10, 2016)
## [1.8.0] - 2020-01-01
* Fix a crash at startup when database is corrupted
- New bar chart showing number of repetitions performed in each week, month, quarter or year.
- Improved calculation of streaks for non-daily habits: performing habits on irregular weekdays will no longer break your streak.
- Many more colors to choose from (now 20 in total).
- Ability to customize how transparent the widgets are on your home screen.
- Ability to customize the first day of the week.
- Yes/No buttons on notifications, instead of just "Check".
- Automatic dark theme according to phone settings (Android 10).
- Smaller APK and backup files.
- Many other internal code changes improving performance and stability.
### 1.6.0 (Oct 10, 2016)
## [1.7.11] - 2019-08-10
* Add option to make notifications sticky
* Add option to hide completed habits
* Display total number of repetitions for each habit
* Pebble integration: check/snooze habits from the watch
* Tasker/Locale integration: allow third-party apps to add checkmarks
* Export an unified CSV file, with checkmarks for all the habits
* Increase width of name column according to screen size
* Stop showing reminders for archived habits
* Add Danish, Dutch, Greek, Hindi and Portuguese (PT) translations
* Other minor fixes and enhancements
- Fix bug that produced corrupted CSV files in some countries
### 1.5.6 (Jun 19, 2016)
## [1.7.10] - 2019-06-15
* Fix bug that prevented checkmark widget from working
- Fix bug that prevented some devices from showing notifications.
- Update targetSdk to Android Pie (API level 28)
### 1.5.5 (Jun 19, 2016)
## [1.7.8] - 2018-04-21
* Fix bug that prevented check button on notification to work sometimes
* Fix bug that caused back button to apparently erase some checkmarks
* Complete French translation
* Add Croatian and Slovenian translations
- Add support for adaptive icons (Oreo)
- Add support for notification channels (Oreo)
- Update translations
### 1.5.4 (May 29, 2016)
## [1.7.7] - 2017-09-30
* Fix crash upon opening settings screen in some phones
* Fix missing folders in CSV archive
* Add Serbian translation
- Fix bug that caused reminders to show repeatedly on DST changes
### 1.5.3 (May 22, 2016)
## [1.7.6] - 2017-07-18
* Complete Arabic and Czech translations
* Fix crash at startup
* Fix checkmark widget on custom launchers
- Fix bug that caused widgets not to render sometimes
- Fix other minor bugs
- Update translations
### 1.5.2 (May 19, 2016)
## [1.7.3] - 2017-05-30
* Fix missing attachment on bug reports
* Fix bug that prevents some widgets from rendering
* Complete Japanese translation
- Improve performance of 'sort by score'
- Other minor bug fixes
### 1.5.1 (May 17, 2016)
## [1.7.2] - 2017-05-27
* Fix build on F-Droid
- Fix crash at startup
### 1.5.0 (May 15, 2016)
## [1.7.1] - 2017-05-21
* Add night mode, with AMOLED support
* Backport material design to older devices
* Display more information on statistics screen
* Display score on main screen and checkmark widget
* Make widgets react immediately to touch
* Reschedule reminders after reboot
* Pick first day of the week according to country
* Add option to reverse order of days on main screen
* Add option to change notification sounds
* Add Catalan, Indonesian, Turkish, Ukrainian translations
* Switch between Simplified/Traditional Chinese according to country
- Fix crash (BadParcelableException)
- Fix layout for RTL languages such as Arabic
- Automatically detect and reject invalid database files
- Add Hebrew translation
### 1.4.1 (April 9, 2016)
## [1.7.0] - 2017-03-31
* Show error message on widgets, instead of crashing
* Complete French translation
* Minor fixes to other translations
- Sort habits automatically
- Allow swiping the header to see previous days
- Import backups directly from Google Drive or Dropbox
- Refresh data automatically at midnight
- Other minor bug fixes and enhancements
### 1.4.0 (April 7, 2016)
## [1.6.2] - 2016-10-13
* Ability to import data from third-party apps
* Ability to save and restore full database backup
* Show more information on streak chart
* Simplify interface for creating habits
* Add link to Frequently Asked Questions (FAQ)
* Reduce app loading time and lag on widgets
* Generate bug reports on crash and from settings screen
* Disable vibration according to phone settings
* Add Czech translation
* Fix wrong month names for some languages
- Fix crash on Android 4.1
### 1.3.3 (March 20, 2016)
## [1.6.1] - 2016-10-10
* Add Spanish and Korean translations
* Make small corrections to other translations
* Fix incorrect date in history calendar
- Fix a crash at startup when database is corrupted
### 1.3.2 (March 18, 2016)
## [1.6.0] - 2016-10-10
* Add Arabic, Italian, Polish, Russian and Swedish translations
* Minor fixes to German and French translations
* Minor bug fixes
- Add option to make notifications sticky
- Add option to hide completed habits
- Display total number of repetitions for each habit
- Pebble integration: check/snooze habits from the watch
- Tasker/Locale integration: allow third-party apps to add checkmarks
- Export an unified CSV file, with checkmarks for all the habits
- Increase width of name column according to screen size
- Stop showing reminders for archived habits
- Add Danish, Dutch, Greek, Hindi and Portuguese (PT) translations
- Other minor fixes and enhancements
### 1.3.1 (March 15, 2016)
## [1.5.6] - 2016-06-19
* Fixes crash on devices with large screen, such as the Nexus 10
* Fixes crash when clicking widgets and reminders of deleted habits
* Other minor bug fixes
- Fix bug that prevented checkmark widget from working
### 1.3.0 (March 12, 2016)
## [1.5.5] - 2016-06-19
* New frequency plot: view total repetitions per day of week
* New history editor: put checkmarks in the past
* Add German, French and Japanese translations
* Add about screen, with credits to all contributors
* Fix small bug that prevented habit from being reordered
* Fix small bug caused by rotating the device
- Fix bug that prevented check button on notification to work sometimes
- Fix bug that caused back button to apparently erase some checkmarks
- Complete French translation
- Add Croatian and Slovenian translations
### 1.2.0 (March 4, 2016)
## [1.5.4] - 2016-05-29
* Ability to export habit data as CSV
* Widgets (checkmark, history, score and streaks)
* More natural scrolling on data views (fling)
* Minor UI improvements on pre-Lollipop devices
* Fix crash on Samsung Galaxy TabS 8.4
* Other minor bug fixes
- Fix crash upon opening settings screen in some phones
- Fix missing folders in CSV archive
- Add Serbian translation
### 1.1.1 (February 24, 2016)
## [1.5.3] - 2016-05-22
* Show reminder only on chosen days of the week
* Rearrange habits by long-pressing then dragging
* Select and modify multiple habits simultaneously
* 12/24 hour format according to phone preferences
* Permanently delete habits
* Usage hints during startup
* Translation to Brazilian Portuguese and Chinese
* Other minor fixes
- Complete Arabic and Czech translations
- Fix crash at startup
- Fix checkmark widget on custom launchers
### 1.0.0 (February 19, 2016)
## [1.5.2] - 2016-05-19
* Initial release
- Fix missing attachment on bug reports
- Fix bug that prevents some widgets from rendering
- Complete Japanese translation
## [1.5.1] - 2016-05-17
- Fix build on F-Droid
## [1.5.0] - 2016-05-15
- Add night mode, with AMOLED support
- Backport material design to older devices
- Display more information on statistics screen
- Display score on main screen and checkmark widget
- Make widgets react immediately to touch
- Reschedule reminders after reboot
- Pick first day of the week according to country
- Add option to reverse order of days on main screen
- Add option to change notification sounds
- Add Catalan, Indonesian, Turkish, Ukrainian translations
- Switch between Simplified/Traditional Chinese according to country
## [1.4.1] - 2016-04-09
- Show error message on widgets, instead of crashing
- Complete French translation
- Minor fixes to other translations
## [1.4.0] - 2016-04-07
- Ability to import data from third-party apps
- Ability to save and restore full database backup
- Show more information on streak chart
- Simplify interface for creating habits
- Add link to Frequently Asked Questions (FAQ)
- Reduce app loading time and lag on widgets
- Generate bug reports on crash and from settings screen
- Disable vibration according to phone settings
- Add Czech translation
- Fix wrong month names for some languages
## [1.3.3] - 2016-03-20
- Add Spanish and Korean translations
- Make small corrections to other translations
- Fix incorrect date in history calendar
## [1.3.2] - 2016-03-18
- Add Arabic, Italian, Polish, Russian and Swedish translations
- Minor fixes to German and French translations
- Minor bug fixes
## [1.3.1] - 2016-03-15
- Fixes crash on devices with large screen, such as the Nexus 10
- Fixes crash when clicking widgets and reminders of deleted habits
- Other minor bug fixes
## [1.3.0] - 2016-03-12
- New frequency plot: view total repetitions per day of week
- New history editor: put checkmarks in the past
- Add German, French and Japanese translations
- Add about screen, with credits to all contributors
- Fix small bug that prevented habit from being reordered
- Fix small bug caused by rotating the device
## [1.2.0] - 2016-03-04
- Ability to export habit data as CSV
- Widgets (checkmark, history, score and streaks)
- More natural scrolling on data views (fling)
- Minor UI improvements on pre-Lollipop devices
- Fix crash on Samsung Galaxy TabS 8.4
- Other minor bug fixes
## [1.1.1] - 2016-02-24
- Show reminder only on chosen days of the week
- Rearrange habits by long-pressing then dragging
- Select and modify multiple habits simultaneously
- 12/24 hour format according to phone preferences
- Permanently delete habits
- Usage hints during startup
- Translation to Brazilian Portuguese and Chinese
- Other minor fixes
## [1.0.0] - 2016-02-19
- Initial release

View File

@@ -1,4 +1,15 @@
# Loop Habit Tracker
<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" />
</a>
<a href="https://github.com/iSoron/uhabits/releases/latest">
<img 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" />
</a>
</p>
Loop is a mobile app that helps you create and maintain good habits,
allowing you to achieve your long-term goals. Detailed graphs and statistics
@@ -63,8 +74,10 @@ contribute, even if you are not a software developer.
* **Report bugs, suggest features.** The easiest way to contribute is to simply
use the app and let us know if you find any problems or have any suggestions
to improve it. You can either use the link inside the app, or open an issue
at GitHub. If you would like to receive the newest versions of the app
to improve it. To report a problem, please [create a new bug report](https://github.com/iSoron/uhabits/issues/new/choose).
To request a new feature or vote on existing feature requests, please visit
our [GitHub Discussions page](https://github.com/iSoron/uhabits/discussions/categories/feature-requests).
If you would like to receive the newest versions of the app
earlier than everyone else, [join our open beta on Google Play][beta].
* **Spread the word.** If you like the app, share it with your family, friends
@@ -77,13 +90,13 @@ contribute, even if you are not a software developer.
is already completed, you are also very welcome to join and proofread it.
* **Write some code.** If you are an Android developer, you are very welcome to
contribute with code. Please, see the [developer guidelines][dev-guide] for more details.
contribute with code. Please see `docs/GUIDELINES.md`.
## License
<img align="right" src="https://www.gnu.org/graphics/gplv3-88x31.png">
Copyright (C) 2016-2019 Álinson Santos Xavier <isoron@gmail.com>
Copyright (C) 2016-2021 Álinson Santos Xavier <isoron@gmail.com>
Loop Habit Tracker is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by the
@@ -98,22 +111,21 @@ contribute, even if you are not a software developer.
You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
[screen1]: screenshots/uhabits1.png
[screen2]: screenshots/uhabits2.png
[screen3]: screenshots/uhabits3.png
[screen4]: screenshots/uhabits4.png
[screen5]: screenshots/uhabits5.png
[screen6]: screenshots/uhabits6.png
[screen1th]: screenshots/uhabits1_th.png
[screen2th]: screenshots/uhabits2_th.png
[screen3th]: screenshots/uhabits3_th.png
[screen4th]: screenshots/uhabits4_th.png
[screen5th]: screenshots/uhabits5_th.png
[screen6th]: screenshots/uhabits6_th.png
[screen1]: screenshots/1.png
[screen2]: screenshots/2.png
[screen3]: screenshots/3.png
[screen4]: screenshots/4.png
[screen5]: screenshots/5.png
[screen6]: screenshots/6.png
[screen1th]: screenshots/1.thumb.png
[screen2th]: screenshots/2.thumb.png
[screen3th]: screenshots/3.thumb.png
[screen4th]: screenshots/4.thumb.png
[screen5th]: screenshots/5.thumb.png
[screen6th]: screenshots/6.thumb.png
[poedit]: http://translate.loophabits.org
[playstore]: https://play.google.com/store/apps/details?id=org.isoron.uhabits
[releases]: https://github.com/iSoron/uhabits/releases
[fdroid]: http://f-droid.org/app/org.isoron.uhabits
[dev-guide]: https://github.com/iSoron/uhabits/wiki/Developer-guidelines
[build]: https://github.com/iSoron/uhabits/wiki/Developer-guidelines#building
[build]: https://github.com/iSoron/uhabits/blob/dev/docs/BUILD.md
[beta]: https://play.google.com/apps/testing/org.isoron.uhabits

View File

@@ -1 +0,0 @@
/build

View File

@@ -1,31 +0,0 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion COMPILE_SDK_VERSION as Integer
defaultConfig {
minSdkVersion MIN_SDK_VERSION as Integer
targetSdkVersion TARGET_SDK_VERSION as Integer
versionCode VERSION_CODE as Integer
versionName "$VERSION_NAME"
}
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
dependencies {
implementation "com.google.dagger:dagger:$DAGGER_VERSION"
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation "org.apache.commons:commons-lang3:3.5"
annotationProcessor "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
}

View File

@@ -1,25 +0,0 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /gemini-b/opt/android-sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@@ -1,2 +0,0 @@
<manifest package="org.isoron.androidbase"
xmlns:android="http://schemas.android.com/apk/res/android"/>

View File

@@ -1,156 +0,0 @@
/*
* Copyright (C) 2017 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.androidbase;
import android.content.*;
import android.os.*;
import android.view.*;
import androidx.annotation.NonNull;
import java.io.*;
import java.text.*;
import java.util.*;
import javax.inject.*;
public class AndroidBugReporter
{
private final Context context;
@Inject
public AndroidBugReporter(@NonNull @AppContext Context context)
{
this.context = context;
}
/**
* Captures and returns a bug report. The bug report contains some device
* information and the logcat.
*
* @return a String containing the bug report.
* @throws IOException when any I/O error occur.
*/
@NonNull
public String getBugReport() throws IOException
{
String logcat = getLogcat();
String deviceInfo = getDeviceInfo();
String log = "---------- BUG REPORT BEGINS ----------\n";
log += deviceInfo + "\n" + logcat;
log += "---------- BUG REPORT ENDS ------------\n";
return log;
}
public String getDeviceInfo()
{
if (context == null) return "null context\n";
WindowManager wm =
(WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
return
String.format("App Version Name: %s\n", BuildConfig.VERSION_NAME) +
String.format("App Version Code: %s\n", BuildConfig.VERSION_CODE) +
String.format("OS Version: %s (%s)\n",
System.getProperty("os.version"), Build.VERSION.INCREMENTAL) +
String.format("OS API Level: %s\n", Build.VERSION.SDK) +
String.format("Device: %s\n", Build.DEVICE) +
String.format("Model (Product): %s (%s)\n", Build.MODEL,
Build.PRODUCT) +
String.format("Manufacturer: %s\n", Build.MANUFACTURER) +
String.format("Other tags: %s\n", Build.TAGS) +
String.format("Screen Width: %s\n",
wm.getDefaultDisplay().getWidth()) +
String.format("Screen Height: %s\n",
wm.getDefaultDisplay().getHeight()) +
String.format("External storage state: %s\n\n",
Environment.getExternalStorageState());
}
public String getLogcat() throws IOException
{
int maxLineCount = 250;
StringBuilder builder = new StringBuilder();
String[] command = new String[]{ "logcat", "-d" };
java.lang.Process process = Runtime.getRuntime().exec(command);
InputStreamReader in = new InputStreamReader(process.getInputStream());
BufferedReader bufferedReader = new BufferedReader(in);
LinkedList<String> log = new LinkedList<>();
String line;
while ((line = bufferedReader.readLine()) != null)
{
log.addLast(line);
if (log.size() > maxLineCount) log.removeFirst();
}
for (String l : log)
{
builder.append(l);
builder.append('\n');
}
return builder.toString();
}
/**
* Captures a bug report and saves it to a file in the SD card.
* <p>
* The contents of the file are generated by the method {@link
* #getBugReport()}. The file is saved in the apps's external private
* storage.
*
* @return the generated file.
* @throws IOException when I/O errors occur.
*/
@NonNull
public void dumpBugReportToFile()
{
try
{
String date =
new SimpleDateFormat("yyyy-MM-dd HHmmss", Locale.US).format(
new Date());
if (context == null) throw new IllegalStateException();
File dir = new AndroidDirFinder(context).getFilesDir("Logs");
if (dir == null)
throw new IOException("log dir should not be null");
File logFile =
new File(String.format("%s/Log %s.txt", dir.getPath(), date));
FileWriter output = new FileWriter(logFile);
output.write(getBugReport());
output.close();
}
catch (IOException e)
{
e.printStackTrace();
}
}
}

View File

@@ -1,60 +0,0 @@
/*
* Copyright (C) 2017 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.androidbase;
import android.content.*;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.content.*;
import android.util.*;
import org.isoron.androidbase.utils.*;
import java.io.*;
import javax.inject.*;
public class AndroidDirFinder
{
@NonNull
private Context context;
@Inject
public AndroidDirFinder(@NonNull @AppContext Context context)
{
this.context = context;
}
@Nullable
public File getFilesDir(@Nullable String relativePath)
{
File externalFilesDirs[] =
ContextCompat.getExternalFilesDirs(context, null);
if (externalFilesDirs == null)
{
Log.e("BaseSystem",
"getFilesDir: getExternalFilesDirs returned null");
return null;
}
return FileUtils.getDir(externalFilesDirs, relativePath);
}
}

View File

@@ -1,68 +0,0 @@
/*
* Copyright (C) 2017 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.androidbase;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import org.isoron.androidbase.activities.*;
public class BaseExceptionHandler implements Thread.UncaughtExceptionHandler
{
@Nullable
private Thread.UncaughtExceptionHandler originalHandler;
@NonNull
private BaseActivity activity;
public BaseExceptionHandler(@NonNull BaseActivity activity)
{
this.activity = activity;
originalHandler = Thread.getDefaultUncaughtExceptionHandler();
}
@Override
public void uncaughtException(@Nullable Thread thread,
@Nullable Throwable ex)
{
if (ex == null) return;
try
{
ex.printStackTrace();
new AndroidBugReporter(activity).dumpBugReportToFile();
}
catch (Exception e)
{
e.printStackTrace();
}
// if (ex.getCause() instanceof InconsistentDatabaseException)
// {
// HabitsApplication app = (HabitsApplication) activity.getApplication();
// HabitList habits = app.getComponent().getHabitList();
// habits.repair();
// System.exit(0);
// }
if (originalHandler != null)
originalHandler.uncaughtException(thread, ex);
}
}

View File

@@ -1,70 +0,0 @@
/*
* Copyright (C) 2017 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.androidbase;
import android.content.*;
import androidx.annotation.NonNull;
import java.io.*;
import java.security.*;
import java.security.cert.Certificate;
import java.security.cert.*;
import javax.inject.*;
import javax.net.ssl.*;
public class SSLContextProvider
{
private Context context;
@Inject
public SSLContextProvider(@NonNull @AppContext Context context)
{
this.context = context;
}
public SSLContext getCACertSSLContext()
{
try
{
CertificateFactory cf = CertificateFactory.getInstance("X.509");
InputStream caInput = context.getAssets().open("cacert.pem");
Certificate ca = cf.generateCertificate(caInput);
KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
ks.load(null, null);
ks.setCertificateEntry("ca", ca);
TrustManagerFactory tmf = TrustManagerFactory.getInstance(
TrustManagerFactory.getDefaultAlgorithm());
tmf.init(ks);
SSLContext ctx = SSLContext.getInstance("TLS");
ctx.init(null, tmf.getTrustManagers(), null);
return ctx;
}
catch (Exception e)
{
throw new RuntimeException(e);
}
}
}

View File

@@ -1,129 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.androidbase.activities;
import android.content.*;
import android.os.*;
import androidx.annotation.Nullable;
import androidx.appcompat.app.*;
import android.view.*;
import org.isoron.androidbase.*;
import static android.R.anim.fade_in;
import static android.R.anim.fade_out;
/**
* Base class for all activities in the application.
* <p>
* This class delegates the responsibilities of an Android activity to other
* classes. For example, callbacks related to menus are forwarded to a {@link
* BaseMenu}, while callbacks related to activity results are forwarded to a
* {@link BaseScreen}.
* <p>
* A BaseActivity also installs an {@link java.lang.Thread.UncaughtExceptionHandler}
* to the main thread. By default, this handler is an instance of
* BaseExceptionHandler, which logs the exception to the disk before the application
* crashes. To the default handler, you should override the method
* getExceptionHandler.
*/
abstract public class BaseActivity extends AppCompatActivity
{
@Nullable
private BaseMenu baseMenu;
@Nullable
private BaseScreen screen;
@Override
public boolean onCreateOptionsMenu(@Nullable Menu menu)
{
if (menu == null) return true;
if (baseMenu == null) return true;
baseMenu.onCreate(getMenuInflater(), menu);
return true;
}
@Override
public boolean onOptionsItemSelected(@Nullable MenuItem item)
{
if (item == null) return false;
if (baseMenu == null) return false;
return baseMenu.onItemSelected(item);
}
public void restartWithFade(Class<?> cls)
{
new Handler().postDelayed(() ->
{
finish();
overridePendingTransition(fade_in, fade_out);
startActivity(new Intent(this, cls));
}, 500); // HACK: Let the menu disappear first
}
public void setBaseMenu(@Nullable BaseMenu baseMenu)
{
this.baseMenu = baseMenu;
}
public void setScreen(@Nullable BaseScreen screen)
{
this.screen = screen;
}
public void showDialog(AppCompatDialogFragment dialog, String tag)
{
dialog.show(getSupportFragmentManager(), tag);
}
public void showDialog(AppCompatDialog dialog)
{
dialog.show();
}
@Override
protected void onActivityResult(int request, int result, Intent data)
{
if (screen == null) super.onActivityResult(request, result, data);
else screen.onResult(request, result, data);
}
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
Thread.setDefaultUncaughtExceptionHandler(getExceptionHandler());
}
protected Thread.UncaughtExceptionHandler getExceptionHandler()
{
return new BaseExceptionHandler(this);
}
@Override
protected void onResume()
{
super.onResume();
if(screen != null) screen.reattachDialogs();
}
}

View File

@@ -1,104 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.androidbase.activities;
import android.view.*;
import androidx.annotation.MenuRes;
import androidx.annotation.NonNull;
/**
* Base class for all the menus in the application.
* <p>
* This class receives from BaseActivity all callbacks related to menus, such as
* menu creation and click events. It also handles some implementation details
* of creating menus in Android, such as inflating the resources.
*/
public abstract class BaseMenu
{
@NonNull
private final BaseActivity activity;
public BaseMenu(@NonNull BaseActivity activity)
{
this.activity = activity;
}
@NonNull
public BaseActivity getActivity()
{
return activity;
}
/**
* Declare that the menu has changed, and should be recreated.
*/
public void invalidate()
{
activity.invalidateOptionsMenu();
}
/**
* Called when the menu is first displayed.
* <p>
* The given menu is already inflated and ready to receive items. The
* application should override this method and add items to the menu here.
*
* @param menu the menu that is being created.
*/
public void onCreate(@NonNull Menu menu)
{
}
/**
* Called when the menu is first displayed.
* <p>
* This method should not be overridden. The application should override
* the methods onCreate(Menu) and getMenuResourceId instead.
*
* @param inflater a menu inflater, for creating the menu
* @param menu the menu that is being created.
*/
public void onCreate(@NonNull MenuInflater inflater, @NonNull Menu menu)
{
menu.clear();
inflater.inflate(getMenuResourceId(), menu);
onCreate(menu);
}
/**
* Called whenever an item on the menu is selected.
*
* @param item the item that was selected.
* @return true if the event was consumed, or false otherwise
*/
public boolean onItemSelected(@NonNull MenuItem item)
{
return false;
}
/**
* Returns the id of the resource that should be used to inflate this menu.
*
* @return id of the menu resource.
*/
@MenuRes
protected abstract int getMenuResourceId();
}

View File

@@ -1,110 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.androidbase.activities;
import android.content.*;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.Toolbar;
import android.view.*;
import android.widget.*;
import org.isoron.androidbase.*;
import org.isoron.androidbase.utils.*;
import static android.os.Build.VERSION.SDK_INT;
import static android.os.Build.VERSION_CODES.LOLLIPOP;
/**
* Base class for all root views in the application.
* <p>
* A root view is an Android view that is directly attached to an activity. This
* view usually includes a toolbar and a progress bar. This abstract class hides
* some of the complexity of setting these things up, for every version of
* Android.
*/
public abstract class BaseRootView extends FrameLayout
{
@NonNull
private final Context context;
protected boolean shouldDisplayHomeAsUp = false;
@Nullable
private BaseScreen screen;
public BaseRootView(@NonNull Context context)
{
super(context);
this.context = context;
}
public boolean getDisplayHomeAsUp()
{
return shouldDisplayHomeAsUp;
}
public void setDisplayHomeAsUp(boolean b)
{
shouldDisplayHomeAsUp = b;
}
@NonNull
public Toolbar getToolbar()
{
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
if (toolbar == null) throw new RuntimeException(
"Your BaseRootView should have a " +
"toolbar with id R.id.toolbar");
return toolbar;
}
public int getToolbarColor()
{
StyledResources res = new StyledResources(context);
return res.getColor(R.attr.colorPrimary);
}
protected void initToolbar()
{
if (SDK_INT >= LOLLIPOP)
{
getToolbar().setElevation(InterfaceUtils.dpToPixels(context, 2));
View view = findViewById(R.id.toolbarShadow);
if (view != null) view.setVisibility(GONE);
view = findViewById(R.id.headerShadow);
if (view != null) view.setVisibility(GONE);
}
}
public void onAttachedToScreen(BaseScreen screen)
{
this.screen = screen;
}
@Nullable
public BaseScreen getScreen()
{
return screen;
}
}

View File

@@ -1,318 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.androidbase.activities;
import android.content.*;
import android.graphics.*;
import android.graphics.drawable.*;
import android.net.*;
import android.os.*;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.core.content.res.*;
import androidx.appcompat.app.*;
import androidx.appcompat.view.ActionMode;
import androidx.appcompat.widget.Toolbar;
import android.view.*;
import android.widget.*;
import com.google.android.material.snackbar.Snackbar;
import org.isoron.androidbase.*;
import org.isoron.androidbase.utils.*;
import java.io.*;
import static android.os.Build.VERSION.SDK_INT;
import static android.os.Build.VERSION_CODES.LOLLIPOP;
import static androidx.core.content.FileProvider.getUriForFile;
/**
* Base class for all screens in the application.
* <p>
* Screens are responsible for deciding what root views and what menus should be
* attached to the main window. They are also responsible for showing other
* screens and for receiving their results.
*/
public class BaseScreen
{
protected BaseActivity activity;
@Nullable
private BaseRootView rootView;
@Nullable
private BaseSelectionMenu selectionMenu;
protected Snackbar snackbar;
public BaseScreen(@NonNull BaseActivity activity)
{
this.activity = activity;
}
@Deprecated
public static int getDefaultActionBarColor(Context context)
{
if (SDK_INT < LOLLIPOP)
{
return ResourcesCompat.getColor(context.getResources(),
R.color.grey_900, context.getTheme());
}
else
{
StyledResources res = new StyledResources(context);
return res.getColor(R.attr.colorPrimary);
}
}
@Deprecated
public static void setupActionBarColor(@NonNull AppCompatActivity activity,
int color)
{
Toolbar toolbar = (Toolbar) activity.findViewById(R.id.toolbar);
if (toolbar == null) return;
activity.setSupportActionBar(toolbar);
ActionBar actionBar = activity.getSupportActionBar();
if (actionBar == null) return;
actionBar.setDisplayHomeAsUpEnabled(true);
ColorDrawable drawable = new ColorDrawable(color);
actionBar.setBackgroundDrawable(drawable);
if (SDK_INT >= LOLLIPOP)
{
int darkerColor = ColorUtils.mixColors(color, Color.BLACK, 0.75f);
activity.getWindow().setStatusBarColor(darkerColor);
toolbar.setElevation(InterfaceUtils.dpToPixels(activity, 2));
View view = activity.findViewById(R.id.toolbarShadow);
if (view != null) view.setVisibility(View.GONE);
view = activity.findViewById(R.id.headerShadow);
if (view != null) view.setVisibility(View.GONE);
}
}
/**
* Notifies the screen that its contents should be updated.
*/
public void invalidate()
{
if (rootView == null) return;
rootView.invalidate();
}
public void invalidateToolbar()
{
if (rootView == null) return;
activity.runOnUiThread(() ->
{
Toolbar toolbar = rootView.getToolbar();
activity.setSupportActionBar(toolbar);
ActionBar actionBar = activity.getSupportActionBar();
if (actionBar == null) return;
actionBar.setDisplayHomeAsUpEnabled(rootView.getDisplayHomeAsUp());
int color = rootView.getToolbarColor();
setActionBarColor(actionBar, color);
setStatusBarColor(color);
});
}
/**
* Called when another Activity has finished, and has returned some result.
*
* @param requestCode the request code originally supplied to {@link
* android.app.Activity#startActivityForResult(Intent,
* int, Bundle)}.
* @param resultCode the result code sent by the other activity.
* @param data an Intent containing extra data sent by the other
* activity.
* @see {@link android.app.Activity#onActivityResult(int, int, Intent)}
*/
public void onResult(int requestCode, int resultCode, Intent data)
{
}
/**
* Called after activity has been recreated, and the dialogs should be
* reattached to their controllers.
*/
public void reattachDialogs()
{
}
/**
* Sets the menu to be shown by this screen.
* <p>
* This menu will be visible if when there is no active selection operation.
* If the provided menu is null, then no menu will be shown.
*
* @param menu the menu to be shown.
*/
public void setMenu(@Nullable BaseMenu menu)
{
activity.setBaseMenu(menu);
}
/**
* Sets the root view for this screen.
*
* @param rootView the root view for this screen.
*/
public void setRootView(@Nullable BaseRootView rootView)
{
this.rootView = rootView;
activity.setContentView(rootView);
if (rootView == null) return;
rootView.onAttachedToScreen(this);
invalidateToolbar();
}
/**
* Sets the menu to be shown when a selection is active on the screen.
*
* @param menu the menu to be shown during a selection
*/
public void setSelectionMenu(@Nullable BaseSelectionMenu menu)
{
this.selectionMenu = menu;
}
/**
* Shows a message on the screen.
*
* @param stringId the string resource id for this message.
*/
public void showMessage(@StringRes Integer stringId)
{
if (stringId == null || rootView == null) return;
if (snackbar == null)
{
snackbar = Snackbar.make(rootView, stringId, Snackbar.LENGTH_SHORT);
int tvId = R.id.snackbar_text;
TextView tv = (TextView) snackbar.getView().findViewById(tvId);
tv.setTextColor(Color.WHITE);
}
else snackbar.setText(stringId);
snackbar.show();
}
public void showSendEmailScreen(@StringRes int toId,
@StringRes int subjectId,
String content)
{
String to = activity.getString(toId);
String subject = activity.getString(subjectId);
Intent intent = new Intent();
intent.setAction(Intent.ACTION_SEND);
intent.setType("message/rfc822");
intent.putExtra(Intent.EXTRA_EMAIL, new String[]{ to });
intent.putExtra(Intent.EXTRA_SUBJECT, subject);
intent.putExtra(Intent.EXTRA_TEXT, content);
activity.startActivity(intent);
}
public void showSendFileScreen(@NonNull String archiveFilename)
{
File file = new File(archiveFilename);
Uri fileUri = getUriForFile(activity, "org.isoron.uhabits", file);
Intent intent = new Intent();
intent.setAction(Intent.ACTION_SEND);
intent.setType("application/zip");
intent.putExtra(Intent.EXTRA_STREAM, fileUri);
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
activity.startActivity(intent);
}
/**
* Instructs the screen to start a selection.
* <p>
* If a selection menu was provided, this menu will be shown instead of the
* regular one.
*/
public void startSelection()
{
activity.startSupportActionMode(new ActionModeWrapper());
}
private void setActionBarColor(@NonNull ActionBar actionBar, int color)
{
ColorDrawable drawable = new ColorDrawable(color);
actionBar.setBackgroundDrawable(drawable);
}
private void setStatusBarColor(int baseColor)
{
if (SDK_INT < LOLLIPOP) return;
int darkerColor = ColorUtils.mixColors(baseColor, Color.BLACK, 0.75f);
activity.getWindow().setStatusBarColor(darkerColor);
}
private class ActionModeWrapper implements ActionMode.Callback
{
@Override
public boolean onActionItemClicked(@Nullable ActionMode mode,
@Nullable MenuItem item)
{
if (item == null || selectionMenu == null) return false;
return selectionMenu.onItemClicked(item);
}
@Override
public boolean onCreateActionMode(@Nullable ActionMode mode,
@Nullable Menu menu)
{
if (selectionMenu == null) return false;
if (mode == null || menu == null) return false;
selectionMenu.onCreate(activity.getMenuInflater(), mode, menu);
return true;
}
@Override
public void onDestroyActionMode(@Nullable ActionMode mode)
{
if (selectionMenu == null) return;
selectionMenu.onFinish();
}
@Override
public boolean onPrepareActionMode(@Nullable ActionMode mode,
@Nullable Menu menu)
{
if (selectionMenu == null || menu == null) return false;
return selectionMenu.onPrepare(menu);
}
}
}

View File

@@ -1,130 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.androidbase.activities;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.view.ActionMode;
import android.view.*;
/**
* Base class for all the selection menus in the application.
* <p>
* A selection menu is a menu that appears when the screen starts a selection
* operation. It contains actions that modify the selected items, such as delete
* or archive. Since it replaces the toolbar, it also has a title.
* <p>
* This class hides many implementation details of creating such menus in
* Android. The interface is supposed to look very similar to {@link BaseMenu},
* with a few additional methods, such as finishing the selection operation.
* Internally, it uses an {@link ActionMode}.
*/
public abstract class BaseSelectionMenu
{
@Nullable
private ActionMode actionMode;
/**
* Finishes the selection operation.
*/
public void finish()
{
if (actionMode != null) actionMode.finish();
}
/**
* Declare that the menu has changed, and should be recreated.
*/
public void invalidate()
{
if (actionMode != null) actionMode.invalidate();
}
/**
* Called when the menu is first displayed.
* <p>
* This method should not be overridden. The application should override
* the methods onCreate(Menu) and getMenuResourceId instead.
*
* @param inflater a menu inflater, for creating the menu
* @param mode the action mode associated with this menu.
* @param menu the menu that is being created.
*/
public void onCreate(@NonNull MenuInflater inflater,
@NonNull ActionMode mode,
@NonNull Menu menu)
{
this.actionMode = mode;
inflater.inflate(getResourceId(), menu);
onCreate(menu);
}
/**
* Called when the selection operation is about to finish.
*/
public void onFinish()
{
}
/**
* Called whenever an item on the menu is selected.
*
* @param item the item that was selected.
* @return true if the event was consumed, or false otherwise
*/
public boolean onItemClicked(@NonNull MenuItem item)
{
return false;
}
/**
* Called whenever the menu is invalidated.
*
* @param menu the menu to be refreshed
* @return true if the menu has changes, false otherwise
*/
public boolean onPrepare(@NonNull Menu menu)
{
return false;
}
/**
* Sets the title of the selection menu.
*
* @param title the new title.
*/
public void setTitle(String title)
{
if (actionMode != null) actionMode.setTitle(title);
}
protected abstract int getResourceId();
/**
* Called when the menu is first created.
*
* @param menu the menu being created
*/
protected void onCreate(@NonNull Menu menu)
{
}
}

View File

@@ -1,66 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.androidbase.utils;
import android.graphics.*;
public abstract class ColorUtils
{
public static int mixColors(int color1, int color2, float amount)
{
final byte ALPHA_CHANNEL = 24;
final byte RED_CHANNEL = 16;
final byte GREEN_CHANNEL = 8;
final byte BLUE_CHANNEL = 0;
final float inverseAmount = 1.0f - amount;
int a = ((int) (((float) (color1 >> ALPHA_CHANNEL & 0xff) * amount) +
((float) (color2 >> ALPHA_CHANNEL & 0xff) *
inverseAmount))) & 0xff;
int r = ((int) (((float) (color1 >> RED_CHANNEL & 0xff) * amount) +
((float) (color2 >> RED_CHANNEL & 0xff) *
inverseAmount))) & 0xff;
int g = ((int) (((float) (color1 >> GREEN_CHANNEL & 0xff) * amount) +
((float) (color2 >> GREEN_CHANNEL & 0xff) *
inverseAmount))) & 0xff;
int b = ((int) (((float) (color1 & 0xff) * amount) +
((float) (color2 & 0xff) * inverseAmount))) & 0xff;
return a << ALPHA_CHANNEL | r << RED_CHANNEL | g << GREEN_CHANNEL |
b << BLUE_CHANNEL;
}
public static int setAlpha(int color, float newAlpha)
{
int intAlpha = (int) (newAlpha * 255);
return Color.argb(intAlpha, Color.red(color), Color.green(color),
Color.blue(color));
}
public static int setMinValue(int color, float newValue)
{
float hsv[] = new float[3];
Color.colorToHSV(color, hsv);
hsv[2] = Math.max(hsv[2], newValue);
return Color.HSVToColor(hsv);
}
}

View File

@@ -1,94 +0,0 @@
/*
* Copyright (C) 2017 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.androidbase.utils;
import android.os.*;
import android.util.*;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.io.*;
public abstract class FileUtils
{
public static void copy(File src, File dst) throws IOException
{
FileInputStream inStream = new FileInputStream(src);
FileOutputStream outStream = new FileOutputStream(dst);
copy(inStream, outStream);
}
public static void copy(InputStream inStream, File dst) throws IOException
{
FileOutputStream outStream = new FileOutputStream(dst);
copy(inStream, outStream);
}
public static void copy(InputStream in, OutputStream out) throws IOException
{
int numBytes;
byte[] buffer = new byte[1024];
while ((numBytes = in.read(buffer)) != -1)
out.write(buffer, 0, numBytes);
}
@Nullable
public static File getDir(@NonNull File potentialParentDirs[],
@Nullable String relativePath)
{
if (relativePath == null) relativePath = "";
File chosenDir = null;
for (File dir : potentialParentDirs)
{
if (dir == null || !dir.canWrite()) continue;
chosenDir = dir;
break;
}
if (chosenDir == null)
{
Log.e("FileUtils",
"getDir: all potential parents are null or non-writable");
return null;
}
File dir = new File(
String.format("%s/%s/", chosenDir.getAbsolutePath(), relativePath));
if (!dir.exists() && !dir.mkdirs())
{
Log.e("FileUtils",
"getDir: chosen dir does not exist and cannot be created");
return null;
}
return dir;
}
@Nullable
public static File getSDCardDir(@Nullable String relativePath)
{
File parents[] =
new File[]{ Environment.getExternalStorageDirectory() };
return getDir(parents, relativePath);
}
}

View File

@@ -1,104 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.androidbase.utils;
import android.content.*;
import android.content.res.*;
import android.graphics.*;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.view.*;
import android.util.*;
import android.view.*;
import android.widget.*;
public abstract class InterfaceUtils
{
private static Typeface fontAwesome;
@Nullable
private static Float fixedResolution = null;
public static void setFixedResolution(@NonNull Float f)
{
fixedResolution = f;
}
public static Typeface getFontAwesome(Context context)
{
if(fontAwesome == null) fontAwesome =
Typeface.createFromAsset(context.getAssets(),
"fontawesome-webfont.ttf");
return fontAwesome;
}
public static float dpToPixels(Context context, float dp)
{
if(fixedResolution != null) return dp * fixedResolution;
Resources resources = context.getResources();
DisplayMetrics metrics = resources.getDisplayMetrics();
return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, metrics);
}
public static float spToPixels(Context context, float sp)
{
if(fixedResolution != null) return sp * fixedResolution;
Resources resources = context.getResources();
DisplayMetrics metrics = resources.getDisplayMetrics();
return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, sp, metrics);
}
public static float getDimension(Context context, int id)
{
float dim = context.getResources().getDimension(id);
if (fixedResolution == null) return dim;
else
{
DisplayMetrics dm = context.getResources().getDisplayMetrics();
float actualDensity = dm.density;
return dim / actualDensity * fixedResolution;
}
}
public static void setupEditorAction(@NonNull ViewGroup parent,
@NonNull TextView.OnEditorActionListener listener)
{
for (int i = 0; i < parent.getChildCount(); i++)
{
View child = parent.getChildAt(i);
if (child instanceof ViewGroup)
setupEditorAction((ViewGroup) child, listener);
if (child instanceof TextView)
((TextView) child).setOnEditorActionListener(listener);
}
}
public static boolean isLayoutRtl(View view)
{
return ViewCompat.getLayoutDirection(view) ==
ViewCompat.LAYOUT_DIRECTION_RTL;
}
}

View File

@@ -1,118 +0,0 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.androidbase.utils;
import android.content.*;
import android.content.res.*;
import android.graphics.drawable.*;
import androidx.annotation.AttrRes;
import androidx.annotation.NonNull;
import org.isoron.androidbase.*;
public class StyledResources
{
private static Integer fixedTheme;
private final Context context;
public StyledResources(@NonNull Context context)
{
this.context = context;
}
public static void setFixedTheme(Integer theme)
{
fixedTheme = theme;
}
public boolean getBoolean(@AttrRes int attrId)
{
TypedArray ta = getTypedArray(attrId);
boolean bool = ta.getBoolean(0, false);
ta.recycle();
return bool;
}
public int getDimension(@AttrRes int attrId)
{
TypedArray ta = getTypedArray(attrId);
int dim = ta.getDimensionPixelSize(0, 0);
ta.recycle();
return dim;
}
public int getColor(@AttrRes int attrId)
{
TypedArray ta = getTypedArray(attrId);
int color = ta.getColor(0, 0);
ta.recycle();
return color;
}
public Drawable getDrawable(@AttrRes int attrId)
{
TypedArray ta = getTypedArray(attrId);
Drawable drawable = ta.getDrawable(0);
ta.recycle();
return drawable;
}
public float getFloat(@AttrRes int attrId)
{
TypedArray ta = getTypedArray(attrId);
float f = ta.getFloat(0, 0);
ta.recycle();
return f;
}
public int[] getPalette()
{
int resourceId = getResource(R.attr.palette);
if (resourceId < 0) throw new RuntimeException("resource not found");
return context.getResources().getIntArray(resourceId);
}
public int getResource(@AttrRes int attrId)
{
TypedArray ta = getTypedArray(attrId);
int resourceId = ta.getResourceId(0, -1);
ta.recycle();
return resourceId;
}
private TypedArray getTypedArray(@AttrRes int attrId)
{
int[] attrs = new int[]{ attrId };
if (fixedTheme != null)
return context.getTheme().obtainStyledAttributes(fixedTheme, attrs);
return context.obtainStyledAttributes(attrs);
}
}

View File

@@ -1,6 +0,0 @@
<resources>
<item name="toolbar" type="id" />
<item name="toolbarShadow" type="id" />
<item name="headerShadow" type="id" />
<attr name="palette" format="reference"/>
</resources>

View File

@@ -1 +0,0 @@
/build

View File

@@ -1,24 +0,0 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion COMPILE_SDK_VERSION as Integer
defaultConfig {
minSdkVersion MIN_SDK_VERSION as Integer
targetSdkVersion TARGET_SDK_VERSION as Integer
}
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.0.0'
}

View File

@@ -1,25 +0,0 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /gemini-b/opt/android-sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@@ -1,2 +0,0 @@
<manifest package="com.android"
xmlns:android="http://schemas.android.com/apk/res/android"/>

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="select_hours"/>
<string name="select_minutes"/>
<string name="color_picker_default_title"/>
<string name="clear"/>
<string name="clear_label"/>
<string name="done_label"/>
</resources>

View File

@@ -1,21 +0,0 @@
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:$BUILD_TOOLS_VERSION"
classpath "com.neenbedankt.gradle.plugins:android-apt:1.8"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$KOTLIN_VERSION"
classpath "org.ajoberstar:grgit:1.5.0"
}
}
allprojects {
repositories {
google()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
jcenter()
}
}

View File

@@ -1,279 +0,0 @@
#!/bin/bash
# Copyright (C) 2017 Álinson Santos Xavier <isoron@gmail.com>
# This file is part of Loop Habit Tracker.
#
# Loop Habit Tracker is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# Loop Habit Tracker is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
cd "$(dirname "$0")"
ADB="${ANDROID_HOME}/platform-tools/adb"
EMULATOR="${ANDROID_HOME}/tools/emulator"
GRADLE="./gradlew --stacktrace"
PACKAGE_NAME=org.isoron.uhabits
OUTPUTS_DIR=uhabits-android/build/outputs
VERSION=$(cat gradle.properties | grep VERSION_NAME | sed -e 's/.*=//g;s/ //g')
if [ ! -f "${ANDROID_HOME}/platform-tools/adb" ]; then
echo "Error: ANDROID_HOME is not set correctly"
exit 1
fi
log_error() {
if [ ! -z "$TEAMCITY_VERSION" ]; then
echo "###teamcity[progressMessage '$1']"
else
local COLOR='\033[1;31m'
local NC='\033[0m'
echo -e "$COLOR>>> $1 $NC"
fi
}
log_info() {
if [ ! -z "$TEAMCITY_VERSION" ]; then
echo "###teamcity[progressMessage '$1']"
else
local COLOR='\033[1;32m'
local NC='\033[0m'
echo -e "$COLOR>>> $1 $NC"
fi
}
fail() {
log_error "BUILD FAILED"
exit 1
}
if [ ! -z $RELEASE ]; then
log_info "Reading secret env variables from ../.secret/env"
source ../.secret/env || fail
fi
run_adb_as_root() {
log_info "Running adb as root"
$ADB root
}
build_apk() {
log_info "Removing old APKs..."
rm -vf build/*.apk
if [ ! -z $RELEASE ]; then
log_info "Building release APK"
./gradlew assembleRelease
cp -v uhabits-android/build/outputs/apk/release/uhabits-android-release.apk build/loop-$VERSION-release.apk
fi
log_info "Building debug APK"
./gradlew assembleDebug || fail
cp -v uhabits-android/build/outputs/apk/debug/uhabits-android-debug.apk build/loop-$VERSION-debug.apk
}
build_instrumentation_apk() {
log_info "Building instrumentation APK"
if [ ! -z $RELEASE ]; then
$GRADLE assembleAndroidTest \
-Pandroid.injected.signing.store.file=$LOOP_KEY_STORE \
-Pandroid.injected.signing.store.password=$LOOP_STORE_PASSWORD \
-Pandroid.injected.signing.key.alias=$LOOP_KEY_ALIAS \
-Pandroid.injected.signing.key.password=$LOOP_KEY_PASSWORD || fail
else
$GRADLE assembleAndroidTest || fail
fi
}
uninstall_apk() {
log_info "Uninstalling existing APK"
$ADB uninstall ${PACKAGE_NAME}
}
install_test_butler() {
log_info "Installing Test Butler"
$ADB uninstall com.linkedin.android.testbutler
$ADB install tools/test-butler-app-2.0.2.apk
}
install_apk() {
log_info "Installing APK"
if [ ! -z $RELEASE ]; then
$ADB install -r ${OUTPUTS_DIR}/apk/release/uhabits-android-release.apk || fail
else
$ADB install -t -r ${OUTPUTS_DIR}/apk/debug/uhabits-android-debug.apk || fail
fi
}
install_test_apk() {
log_info "Uninstalling existing test APK"
$ADB uninstall ${PACKAGE_NAME}.test
log_info "Installing test APK"
$ADB install -r ${OUTPUTS_DIR}/apk/androidTest/debug/uhabits-android-debug-androidTest.apk || fail
}
run_instrumented_tests() {
SIZE=$1
log_info "Running instrumented tests"
$ADB shell am instrument \
-r -e coverage true -e size $SIZE \
-w ${PACKAGE_NAME}.test/androidx.test.runner.AndroidJUnitRunner \
| tee ${OUTPUTS_DIR}/instrument.txt
if grep "\(INSTRUMENTATION_STATUS_CODE.*-1\|FAILURES\)" $OUTPUTS_DIR/instrument.txt; then
log_error "Some instrumented tests failed"
fetch_images
fetch_logcat
exit 1
fi
#mkdir -p ${OUTPUTS_DIR}/code-coverage/connected/
#$ADB pull /data/user/0/${PACKAGE_NAME}/files/coverage.ec \
# ${OUTPUTS_DIR}/code-coverage/connected/ \
# || log_error "COVERAGE REPORT NOT AVAILABLE"
}
parse_instrumentation_results() {
log_info "Parsing instrumented test results"
java -jar tools/automator-log-converter-1.5.0.jar ${OUTPUTS_DIR}/instrument.txt || fail
}
generate_coverage_badge() {
log_info "Generating code coverage badge"
CORE_REPORT=uhabits-core/build/reports/jacoco/test/jacocoTestReport.xml
rm -f ${OUTPUTS_DIR}/coverage-badge.svg
python3 tools/coverage-badge/badge.py -i $CORE_REPORT -o ${OUTPUTS_DIR}/coverage-badge
}
fetch_logcat() {
log_info "Fetching logcat"
$ADB logcat -d > ${OUTPUTS_DIR}/logcat.txt
}
run_jvm_tests() {
log_info "Running JVM tests"
if [ ! -z $RELEASE ]; then
$GRADLE testReleaseUnitTest :uhabits-core:check || fail
else
$GRADLE testDebugUnitTest :uhabits-core:check || fail
fi
}
uninstall_test_apk() {
log_info "Uninstalling test APK"
$ADB uninstall ${PACKAGE_NAME}.test
}
fetch_images() {
log_info "Fetching images"
rm -rf $OUTPUTS_DIR/test-screenshots
$ADB pull /sdcard/Android/data/${PACKAGE_NAME}/files/test-screenshots/ $OUTPUTS_DIR
$ADB shell rm -r /sdcard/Android/data/${PACKAGE_NAME}/files/test-screenshots/
}
accept_images() {
find $OUTPUTS_DIR/test-screenshots -name '*.expected*' -delete
rsync -av $OUTPUTS_DIR/test-screenshots/ uhabits-android/src/androidTest/assets/
}
run_tests() {
SIZE=$1
run_adb_as_root
install_test_butler
uninstall_apk
install_apk
install_test_apk
run_instrumented_tests $SIZE
parse_instrumentation_results
fetch_logcat
uninstall_test_apk
}
parse_opts() {
OPTS=`getopt -o r --long release -n 'build.sh' -- "$@"`
if [ $? != 0 ] ; then exit 1; fi
eval set -- "$OPTS"
while true; do
case "$1" in
-r | --release ) RELEASE=1; shift ;;
* ) break ;;
esac
done
}
remove_build_dir() {
rm -rfv build
rm -rfv android-base/build
rm -rfv android-pickers/build
rm -rfv uhabits-android/build
rm -rfv uhabits-core/build
}
case "$1" in
build)
shift; parse_opts $*
build_apk
build_instrumentation_apk
run_jvm_tests
#generate_coverage_badge
;;
medium-tests)
shift; parse_opts $*
run_tests medium
;;
large-tests)
shift; parse_opts $*
run_tests large
;;
fetch-images)
fetch_images
;;
accept-images)
accept_images
;;
install)
shift; parse_opts $*
build_apk
install_apk
;;
clean)
remove_build_dir
;;
*)
cat <<END
Usage: $0 <command> [options]
Builds, installs and tests Loop Habit Tracker
Commands:
accept-images Copies fetched images to corresponding assets folder
build Build APK and run JVM tests
clean Remove build directory
fetch-images Fetches failed view test images from device
install Install app on connected device
large-tests Run large-sized tests on connected device
medium-tests Run medium-sized tests on connected device
Options:
-r --release Build and test release APK, instead of debug
END
exit 1
;;
esac

View File

@@ -1,18 +0,0 @@
VERSION_CODE = 51
VERSION_NAME = 1.8.8
MIN_SDK_VERSION = 21
TARGET_SDK_VERSION = 29
COMPILE_SDK_VERSION = 29
DAGGER_VERSION = 2.25.4
KOTLIN_VERSION = 1.3.61
SUPPORT_LIBRARY_VERSION = 28.0.0
AUTO_FACTORY_VERSION = 1.0-beta6
BUILD_TOOLS_VERSION = 3.5.3
org.gradle.parallel=false
org.gradle.daemon=true
org.gradle.jvmargs=-Xms2048m -Xmx2048m -XX:MaxPermSize=2048m
android.useAndroidX=true
android.enableJetifier=true

View File

@@ -1 +0,0 @@
uhabits-android/src/main/play/

View File

@@ -1 +0,0 @@
include ':uhabits-android', ':uhabits-core', ':android-base', ':android-pickers'

View File

@@ -1,157 +0,0 @@
"""
Generate coverage badges for Coverage.py.
Forked from https://github.com/dbrgn/coverage-badge
"""
# -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals
import os
import sys
import argparse
import pkg_resources
from bs4 import BeautifulSoup
__version__ = '0.2.0-uhabits'
DEFAULT_COLOR = '#a4a61d'
COLORS = {
'brightgreen': '#4c1',
'green': '#97CA00',
'yellowgreen': '#a4a61d',
'yellow': '#dfb317',
'orange': '#fe7d37',
'red': '#e05d44',
'lightgrey': '#9f9f9f',
}
COLOR_RANGES = [
(95, 'brightgreen'),
(90, 'green'),
(75, 'yellowgreen'),
(60, 'yellow'),
(40, 'orange'),
(0, 'red'),
]
class Devnull(object):
"""
A file like object that does nothing.
"""
def write(self, *args, **kwargs):
pass
def get_total(report):
missed = 0
covered = 0
for r in report.split(":"):
doc = BeautifulSoup(open(r), 'xml')
tag = doc.select("report > counter[type^INST]")[0]
missed = missed + float(tag['missed'])
covered = covered + float(tag['covered'])
return str(int(round(100 * covered / (missed + covered))))
def get_color(total):
"""
Return color for current coverage precent
"""
try:
xtotal = int(total)
except ValueError:
return COLORS['lightgrey']
for range_, color in COLOR_RANGES:
if xtotal >= range_:
return COLORS[color]
def get_badge(total, color=DEFAULT_COLOR):
"""
Read the SVG template from the package, update total, return SVG as a
string.
"""
template_path = os.path.join('templates', 'flat.svg')
template = pkg_resources.resource_string(__name__, template_path).decode('utf8')
return template.replace('{{ total }}', total).replace('{{ color }}', color)
def parse_args(argv=None):
"""
Parse the command line arguments.
"""
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('-o', dest='filepath',
help='Save the file to the specified path.')
parser.add_argument('-p', dest='plain_color', action='store_true',
help='Plain color mode. Standard green badge.')
parser.add_argument('-f', dest='force', action='store_true',
help='Force overwrite image, use with -o key.')
parser.add_argument('-q', dest='quiet', action='store_true',
help='Don\'t output any non-error messages.')
parser.add_argument('-v', dest='print_version', action='store_true',
help='Show version.')
parser.add_argument('-i', dest='reportFilename',
help='Jacoco report')
# If arguments have been passed in, use them.
if argv:
return parser.parse_args(argv)
# Otherwise, just use sys.argv directly.
else:
return parser.parse_args()
def save_badge(badge, filepath, force=False):
"""
Save badge to the specified path.
"""
# Validate path (part 1)
if filepath.endswith('/'):
print('Error: Filepath may not be a directory.')
sys.exit(1)
# Get absolute filepath
path = os.path.abspath(filepath)
if not path.lower().endswith('.svg'):
path += '.svg'
# Validate path (part 2)
if not force and os.path.exists(path):
print('Error: "{}" already exists.'.format(path))
sys.exit(1)
# Write file
with open(path, 'w') as f:
f.write(badge)
return path
def main(argv=None):
"""
Console scripts entry point.
"""
args = parse_args(argv)
# Print version
if args.print_version:
print('coverage-badge v{}'.format(__version__))
sys.exit(0)
total = get_total(args.reportFilename)
color = DEFAULT_COLOR if args.plain_color else get_color(total)
badge = get_badge(total, color)
# Show or save output
if args.filepath:
path = save_badge(badge, args.filepath, args.force)
if not args.quiet:
print('Saved badge to {}'.format(path))
else:
print(badge, end='')
if __name__ == '__main__':
main()

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="99" height="20">
<linearGradient id="b" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<mask id="a">
<rect width="99" height="20" rx="3" fill="#fff"/>
</mask>
<g mask="url(#a)">
<path fill="#555" d="M0 0h63v20H0z"/>
<path fill="{{ color }}" d="M63 0h36v20H63z"/>
<path fill="url(#b)" d="M0 0h99v20H0z"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="31.5" y="15" fill="#010101" fill-opacity=".3">coverage</text>
<text x="31.5" y="14">coverage</text>
<text x="80" y="15" fill="#010101" fill-opacity=".3">{{ total }}%</text>
<text x="80" y="14">{{ total }}%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 926 B

View File

@@ -1,137 +0,0 @@
plugins {
id 'idea'
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
id 'com.github.triplet.play' version '2.6.2'
}
android {
compileSdkVersion COMPILE_SDK_VERSION as Integer
def secretPropsFile = file("../../.secret/gradle.properties")
if (secretPropsFile.exists()) {
def secrets = new Properties()
secretPropsFile.withInputStream { secrets.load(it) }
signingConfigs {
release {
storeFile file(secrets.LOOP_KEY_STORE)
storePassword secrets.LOOP_STORE_PASSWORD
keyAlias secrets.LOOP_KEY_ALIAS
keyPassword secrets.LOOP_KEY_PASSWORD
}
}
buildTypes.release.signingConfig signingConfigs.release
}
defaultConfig {
versionCode VERSION_CODE as Integer
versionName "$VERSION_NAME"
minSdkVersion MIN_SDK_VERSION as Integer
targetSdkVersion TARGET_SDK_VERSION as Integer
applicationId "org.isoron.uhabits"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
debug {
testCoverageEnabled true
}
}
lintOptions {
checkReleaseBuilds false
abortOnError false
disable 'GoogleAppIndexingWarning'
}
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
testOptions {
unitTests.all {
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
outputs.upToDateWhen { false }
showStandardStreams = true
}
}
}
sourceSets {
main.assets.srcDirs += '../uhabits-core/src/main/resources/'
}
}
dependencies {
implementation project(":uhabits-core")
implementation project(":android-base")
implementation project(":android-pickers")
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation "com.github.paolorotolo:appintro:3.4.0"
implementation "com.google.dagger:dagger:$DAGGER_VERSION"
implementation "com.jakewharton:butterknife:8.6.1-SNAPSHOT"
implementation "org.apmem.tools:layouts:1.10"
implementation "com.google.code.gson:gson:2.8.5"
implementation "com.google.code.findbugs:jsr305:3.0.2"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$KOTLIN_VERSION"
compileOnly "javax.annotation:jsr250-api:1.0"
compileOnly "com.google.auto.factory:auto-factory:$AUTO_FACTORY_VERSION"
kapt "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
kapt "com.jakewharton:butterknife-compiler:10.2.1"
annotationProcessor "com.google.auto.factory:auto-factory:$AUTO_FACTORY_VERSION"
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
androidTestImplementation "com.google.dagger:dagger:$DAGGER_VERSION"
androidTestImplementation "com.linkedin.testbutler:test-butler-library:1.3.1"
androidTestCompileOnly "com.google.auto.factory:auto-factory:$AUTO_FACTORY_VERSION"
androidTestAnnotationProcessor "com.google.auto.factory:auto-factory:$AUTO_FACTORY_VERSION"
androidTestImplementation 'androidx.annotation:annotation:1.0.0'
androidTestImplementation 'androidx.test:rules:1.1.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation "com.google.guava:guava:24.1-android"
androidTestImplementation project(":uhabits-core")
kaptAndroidTest "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
// mockito-android 2+ includes net.bytebuddy, which causes tests to fail.
// Excluding the package net.bytebuddy on AndroidManifest.xml breaks some
// AndroidJUnitRunner functionality, such as running individual methods.
androidTestImplementation "org.mockito:mockito-core:1.10.19"
androidTestImplementation "com.google.dexmaker:dexmaker-mockito:1.2"
testImplementation "com.google.dagger:dagger:$DAGGER_VERSION"
testImplementation "org.mockito:mockito-core:2.8.9"
testImplementation "org.mockito:mockito-inline:2.8.9"
testImplementation "junit:junit:4.12"
implementation('com.opencsv:opencsv:3.10') {
exclude group: 'commons-logging', module: 'commons-logging'
}
implementation('io.socket:socket.io-client:0.8.3') {
exclude group: 'org.json', module: 'json'
}
}
kapt {
correctErrorTypes = true
}
play {
serviceAccountCredentials = file("../../.secret/gcp-key.json")
track = "alpha"
}

View File

@@ -1,3 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<lint>
</lint>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Some files were not shown because too many files have changed in this diff Show More