Commit Graph

7 Commits

Author SHA1 Message Date
Nik Clayton 5f198b0d90
build: Simplify build infrastructure for command line tools (#613)
Provide a build convention plugin for command line tools, and use
`libs.versions.toml` for command line tool dependencies. Adjust the
individual tool `build.gradle.kts` files accordingly.

Remove unnecessary `gradle.properties` and `settings.gradle` files for
projects that are included as subprojects, not included builds.

Add a trivial test for each command line tool so there are tests to run
and provide some confidence that automated library upgrades don't break
command line tool compilation.
2024-04-15 15:06:55 +02:00
renovate[bot] 4d7f8d4682
fix(deps): update dependency com.github.ajalt.clikt:clikt to v4.3.0 (#574)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.github.ajalt.clikt:clikt](https://togithub.com/ajalt/clikt) |
`4.2.2` -> `4.3.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.github.ajalt.clikt:clikt/4.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.github.ajalt.clikt:clikt/4.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.github.ajalt.clikt:clikt/4.2.2/4.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.github.ajalt.clikt:clikt/4.2.2/4.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>ajalt/clikt (com.github.ajalt.clikt:clikt)</summary>

###
[`v4.3.0`](https://togithub.com/ajalt/clikt/blob/HEAD/CHANGELOG.md#430)

[Compare Source](https://togithub.com/ajalt/clikt/compare/4.2.2...4.3.0)

##### Added

- Added `limit` parameter to `option().counted()` to limit the number of
times the option can be used. You can either clamp the value to the
limit, or throw an error if the limit is exceeded.
([#&#8203;483](https://togithub.com/ajalt/clikt/issues/483))
- Added `Context.registerClosable` and `Context.callOnClose` to allow
you to register cleanup actions that will be called when the command
exits. ([#&#8203;395](https://togithub.com/ajalt/clikt/issues/395))

##### Fixed

- Fixed `unrecognized modifier 'i'` that happened on tab-completion when
using sub command aliases. Thanks to
[@&#8203;hick209](https://togithub.com/hick209) for the contribution.
([#&#8203;500](https://togithub.com/ajalt/clikt/pull/500))
- Make sure auto complete script works on zsh, fixing the error
`complete:13: command not found: compdef`. Thanks to
[@&#8203;hick209](https://togithub.com/hick209) for the contribution.
([#&#8203;499](https://togithub.com/ajalt/clikt/pull/499))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/pachli/pachli-android).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-10 20:03:45 +02:00
renovate[bot] d5cfa3410d
fix(deps): update dependency com.github.ajalt.clikt:clikt to v4 (#125)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.github.ajalt.clikt:clikt](https://togithub.com/ajalt/clikt) |
`3.5.4` -> `4.2.2` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.github.ajalt.clikt:clikt/4.2.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.github.ajalt.clikt:clikt/4.2.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.github.ajalt.clikt:clikt/3.5.4/4.2.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.github.ajalt.clikt:clikt/3.5.4/4.2.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>ajalt/clikt (com.github.ajalt.clikt:clikt)</summary>

###
[`v4.2.2`](https://togithub.com/ajalt/clikt/blob/HEAD/CHANGELOG.md#422)

[Compare Source](https://togithub.com/ajalt/clikt/compare/4.2.1...4.2.2)

##### Changed

- Options and arguments can now reference option groups in their
`defaultLazy` and other finalization blocks. They can also freely
reference each other, including though chains of references.
([#&#8203;473](https://togithub.com/ajalt/clikt/issues/473))
- Updated Kotlin to 1.9.21
([#&#8203;472](https://togithub.com/ajalt/clikt/pull/472))

###
[`v4.2.1`](https://togithub.com/ajalt/clikt/blob/HEAD/CHANGELOG.md#421)

[Compare Source](https://togithub.com/ajalt/clikt/compare/4.2.0...4.2.1)

##### Added

- Added `toString` implementations to options and arguments.
([#&#8203;434](https://togithub.com/ajalt/clikt/issues/434))
- Added `CliktCommand.test` overload that takes a vararg of `String`s as
the command line arguments. Thanks to
[@&#8203;sschuberth](https://togithub.com/sschuberth) for the
contribution
([#&#8203;451](https://togithub.com/ajalt/clikt/issues/451))

##### Fixed

- Update Mordant dependency to fix crashes on native targets and GraalVM
([#&#8203;447](https://togithub.com/ajalt/clikt/issues/447))

###
[`v4.2.0`](https://togithub.com/ajalt/clikt/blob/HEAD/CHANGELOG.md#420)

[Compare Source](https://togithub.com/ajalt/clikt/compare/4.1.0...4.2.0)

##### Added

- Added `requireConfirmation` parameter to `option().prompt()`
([#&#8203;426](https://togithub.com/ajalt/clikt/issues/426))
- Added `CliktCommand.terminal` extension for accessing the terminal
from a command.
- Added `includeSystemEnvvars`, `ansiLevel`, `width`, and `height`
parameters to all `CliktCommand.test` overloads.

##### Deprecated

- Deprecated `CliktCommand.prompt`, use `CliktCommand.terminal.prompt`
or `Prompt` instead.
-   Deprecated `CliktCommand.confirm`, use `YesNoPrompt` instead.

##### Fixed

- Fixed incorrect error message when a `defaultLazy` option referenced a
`required` option.
([#&#8203;430](https://togithub.com/ajalt/clikt/issues/430))

###
[`v4.1.0`](https://togithub.com/ajalt/clikt/blob/HEAD/CHANGELOG.md#410)

[Compare Source](https://togithub.com/ajalt/clikt/compare/4.0.0...4.1.0)

##### Added

- Added `MordantHelpFormatter.renderAttachedOptionValue` that you can
override to change how option values are shown, e.g. if you want option
to show as `--option <value>` instead of `--option=<value>`.
([#&#8203;416](https://togithub.com/ajalt/clikt/issues/416))
- Added `option().optionalValueLazy{}`, which work like
`optionalValue()` but the default value is computed lazily.
([#&#8203;381](https://togithub.com/ajalt/clikt/issues/381))

##### Changed

-   Updated Kotlin to 1.9.0
- `PrintMessage`, `PrintHelpMessage` and `PrintCompletionMessage` now
default to exiting with a status code 0, which is the behavior they had
in 3.x. ([#&#8203;419](https://togithub.com/ajalt/clikt/issues/419))

###
[`v4.0.0`](https://togithub.com/ajalt/clikt/blob/HEAD/CHANGELOG.md#400)

[Compare Source](https://togithub.com/ajalt/clikt/compare/3.5.4...4.0.0)

##### Added

- Added `Context.errorEncountered` which is true if parsing has
continued after an error was encountered.
- `option().help{""}` and `argument().help{""}` extensions that set the
parameter's help text lazily, with access to the current context so that
you can add colors.

##### Changed

- `Option.optionHelp` and `Argument.argumentHelp`,
`CliktCommand.commandHelp`, and `CliktCommand.commandHelpEpilog` are now
methods that take the context as an argument, and the `help` parameter
to `copy` is now a `helpGetter` lambda. `CliktCommand.shortHelp` now
takes the context as an argument.
- The `message` method on `TransformContext` interfaces is now an
extension.

##### Deprecated

- Deprecated `CliktCommand.commandHelp` and `commandHelpEpilog`
properties in favor of the methods with the same name.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/pachli/pachli-android).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMDcuMiIsInVwZGF0ZWRJblZlciI6IjM3LjEyMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-08 16:45:03 +01:00
Nik Clayton e749b362ca
refactor: Start creating core modules (#286)
The existing code base is a single monolithic module. This is relatively
simple to configure, but many of the tasks to compile the module and
produce the final app have to run in series.

This is unnecessarily slow.

This change starts to split the code in to multiple modules, which are:

- :core:account - AccountManager, to break a dependency cycle
- :core:common - low level types or utilities used in many other modules
- :core:database - database types, DAOs, and DI infrastructure
- :core:network - network types, API definitions, and DI infrastructure
- :core:preferences - shared preferences definitions and DI
infrastructure
- :core:testing - fakes and rules used across different modules

Benchmarking with gradle-profiler shows a ~ 17% reduction in incremental
build times after an ABI change. That will improve further as more code
is moved to modules.

The rough mechanics of the changes are:

- Create the modules, and move existing files in to them. This causes a
  lot of churn in import arguments.

- Convert build.gradle files to build.gradle.kts

- Separate out the data required to display a tab (`TabViewData`) from
  the data required to configure a tab (`TabData`) to avoid circular
  dependencies.

- Abstract the repeated build logic shared between the modules in to
  a set of plugins under `build-logic/`, to simplify configuration of
  the application and library builds.

- Be explicit that some nullable types are non-null at time of use.
  Nullable properties in types imported from modules generally can't be
  smart cast to non-null. There's a detailed discussion of why this
restriction exists at
https://discuss.kotlinlang.org/t/what-is-the-reason-behind-smart-cast-being-impossible-to-perform-when-referenced-class-is-in-another-module/2201.

The changes highlight design problems with the current code, including:

- The main application code is too tightly coupled to the network types
- Too many values are declared unnecessarily nullable
- Dependency cycles between code that make modularisation difficult

Future changes will add more modules.

See #291.
2023-12-04 16:58:36 +01:00
Nik Clayton 4a6981fc07
fix(deps): update logging dependencies 2023-11-17 11:09:44 +01:00
Nik Clayton 1bf13b10f8
refactor: Transition from Tusky to Pachli
- Rename packages to app.pachli.*
- Switch to Pachli icons (blue / orange)
- Reset database schema version to 1
- Reset versionCode to 1 and versionName to "1.0"
- Update colour scheme, use colorPrimary etc through the app
- Use Material UI components for toolbars
- Use "Pachli" in strings (UI, constants, etc)
- Update copyright on code I contributed
- Update README
- Update fastlane metadata
2023-09-05 13:33:37 +02:00
Nik Clayton d7b504f31e
change: Add tools/mklanguages
The existing language list is incomplete, sorted incorrectly and does
not use the correct language names.

Add a small tool that parses the resource directories that contain
string translations, determines the correct language name and sort
order, and updates the correct application resources so language
lists are displayed correctly.
2023-09-04 20:22:05 +02:00