Commit Graph

5 Commits

Author SHA1 Message Date
Nik Clayton 5cfe6d055b
fix: Improve parsing of Friendica (and other server) version formats (#376)
Previous code could return an error on Friendica version strings like
`2024.03-dev-1547`.

Fix this:

- Extend the list of explicitly supported servers to include Fedibird,
Friendica, Glitch, Hometown, Iceshrimp, Pixelfed, and Sharkey.

- Add version parsing routines for these servers.

- Test the version parsing routines fetching every server and version
seen by Fediverse Observer (~ 2,000 servers) and ensuring that the
server and version information can be parsed.

Improve the error message:

- Show the hostname with a `ServerRepository` error

Clean up the code:

- Remove the custom `resultOf` and `mapResult` functions, they have
equivalents in newer versions of the library (like `runSuspendCatching`)

Fixes #372
2024-01-23 20:27:25 +01:00
Nik Clayton d8be70a465
chore(deps): update plugin ktlint to v12 (#357) 2024-01-08 23:26:46 +01:00
Nik Clayton a441576bf6
style: Require trailing comma, and break lines
Requiring trailing commas on multi-line lists of items (declarations
and call sites) reduces future repository churn when those lines are
changed, but introduces additional churn now.

Bite the bullet and make the change, as well as adjusting lines that
were too long / indented incorrectly.

The changes were performed automatically, using the `ktlintFormat` task.

Based on https://github.com/tuskyapp/Tusky/pull/3968 by
https://github.com/tinsukE
2023-09-04 20:22:10 +02:00
Nik Clayton ca9b171868
Disable wildcard imports for Java and Kotlin files
Out-of-the-box Android Studio will perform wildcard imports if the import list is >= 3. This is a lint failure.

Adjust the default to 999 so that, in practice, wildcard imports never happen.
2023-04-10 14:26:10 +02:00
Goooler 3592318dc1
Modernize a bit (#3171)
* Remove redundant ignore file

* Add .gitattributes

* Generate new wrapper

* Apply plugins in `plugins`

* Adopt new dsl

* Enable stable config cache

* Ignore all build folders

* Enable build scan

* Disable buildFeatures flags by default

* Migrate to nonTransitive R class

* Tweak flags

* Bump AGP to 7.4.0

* Bump deps

* Run `ktlintFormat`

* Add an icon for IDEA to display

* Revert "Bump deps"

This reverts commit bc0d5b69d59f70289d5d5c4887a85e6af23cc662.

* Revert "Enable build scan"

This reverts commit 1568e5e84f1ee51064b3f426b1da0cf35fb67856.

* Remove com.android.library

* Enable Gradle cache

* Enable room incremental build

* Cleanups

* Cleanups

* Add .editorconfig

* Defer clean task

* Migrate `flavorDimensions`

* Merge instance-build.gradle into app's build.gradle

* Declare compileOptions & kotlinOptions

* Bump jvmTarget to 17

* Fix conflicts

* Xmx4g

* Rename output apks

* Revert "Bump jvmTarget to 17"

This reverts commit e4d1543bda65b6d2979ae0712bceee33fa8298a6.
2023-02-04 19:58:53 +01:00