Commit Graph

17 Commits

Author SHA1 Message Date
renovate[bot]
e1afa63b71 Update dependency com.squareup.moshi:moshi-adapters to v1.15.2 (#1916)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-05 14:11:08 -05:00
Sangho
892a4d9ca5 Remove @Synchronized annotation from Rfc3339DateJsonAdapter. (#1842)
* Remove synchronized modifier from Rfc3339DateJsonAdapter

* Added a small note to avoid regression in the future.
2024-05-28 16:47:45 +00:00
Jake Wharton
7d51df53f5 Do not allocate path outside conditionals
It is not guaranteed to be used at this point and performs a decent amount of allocation and computation.
2024-03-11 14:01:57 -04:00
renovate[bot]
420824f33d Update dependency com.squareup.moshi:moshi-adapters to v1.15.1 2024-01-30 18:14:06 +00:00
Jake Wharton
2cc9ebb88e Update formatters to latest
Ensure renovate can bump them by specifying full coordinates in toml.
2024-01-29 12:10:47 -05:00
renovate[bot]
88e9341996 Update dependency com.squareup.moshi:moshi-adapters to v1.15.0 (#1677)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-21 14:07:24 -04:00
renovate[bot]
8a098d6a07 Update dependency gradle to v8 (#1630)
* Update dependency gradle to v8

* Remove VERSION_CATALOGS feature

* Match JDK 19 in toolchain

* Update forces + fix japicmp version

* ???

* Another

* Update japicmp

* Update shadow plugin

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Zac Sweers <pandanomic@gmail.com>
2023-02-25 18:36:04 +00:00
renovate[bot]
e6110de8c3 Update plugin spotless to v6.14.0 (#1620)
* Update plugin spotless to v6.14.0

* Update Spotless version and apply

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jake Wharton <jw@squareup.com>
2023-01-30 14:03:50 +00:00
Zac Sweers
178a6858ff Switch fully over to dokka and fix accidental root project publishing (#1507) 2022-01-17 13:04:35 -05:00
Zac Sweers
47697c2601 Convert JsonReader to Kotlin (#1505)
* Rename .java to .kt

* Convert JsonReader to Kotlin

Made it sealed along the way like JsonWriter

Some of the properties had different docs for setting and getting, which dokka doesn't seem to have a nice way to differentiate. Went with a little marked up form but open to suggestions.

* Restore isLenient name to lenient

This plays nice for both java and kotlin consumers, as it's still isLenient to java consumers but not a source breaking change for kotlin

* Fix peek nullability and a kotlin source change

* Fix another nullability

* Use collection builders

* Ok this didn't work quite as I expected

* Update moshi/src/main/java/com/squareup/moshi/JsonReader.kt

Co-authored-by: Parth Padgaonkar <1294660+JvmName@users.noreply.github.com>

Co-authored-by: Parth Padgaonkar <1294660+JvmName@users.noreply.github.com>
2022-01-17 02:52:02 -05:00
Zac Sweers
323d97c787 Convert JsonAdapter to Kotlin (#1475)
* Rename .java to .kt

* Convert JsonAdapter to Kotlin

Note that there's more to be done here I think, namely exploring removing the NonNull adapter and making the nullSafe() adapter public so that nullability is directly in the API. Saving that for another day though

* Update a couple usages

* Fix override

* Add exclusion for open

* Add `@Language` annotation for json strings

Allows the IDE to automatically make this pretty

* Spotless

* Nullable

Co-authored-by: Egor Andreevich <egor@squareup.com>

* When

Co-authored-by: Parth Padgaonkar <1294660+JvmName@users.noreply.github.com>

* Another when

* Spotless

Co-authored-by: Egor Andreevich <egor@squareup.com>
Co-authored-by: Parth Padgaonkar <1294660+JvmName@users.noreply.github.com>
2022-01-10 11:29:37 -05:00
Zac Sweers
56e1ae6404 Use Okio IOException in Kotlin classes (#1490)
More portability!
2022-01-07 21:02:16 -05:00
Zac Sweers
484d525db4 Convert adapters to Kotlin (#1460)
* Convert Rfc3339DateJsonAdapter

* Convert EnumJsonAdapter

* Convert PolymorphicJsonAdapterFactory

* Convert Rfc3339DateJsonAdapter and Iso8601Utils

* Doc indent fix

* Use template

* Address CR comments

* Spotless and jsr cleanup

* Couple small tweaks

* Remove toList()

* Use simpler map

* Inline GregorianCalendar

* Interp

* Fix copyright

* interp

* Fix another copyright

* Restore toList()
2022-01-06 15:15:48 -05:00
Zac Sweers
e2c346e1de Convert util package to Kotlin (#1461)
* Rename .java to .kt

* Convert NonNullJsonAdapter

* Rename .java to .kt

* Convert NullSafeJsonAdapter

* Fix missing null-check

* Rename .java to .kt

* Convert Util (initial pass)

* Push to top-level Util

* Use extensions and properties where possible

* Use knownNotNull

* Spotless

* Clean up impl type classes a bit

* Update code gen

* Use extension for resolving

* Spotless

* Fix master conflicts

* Rename to toStringWithAnnotations()

* for (t in args.indices) {

* for (i in interfaces.indices) {

* Template
2022-01-06 14:54:13 -05:00
Egor Andreevich
ae421b1909 Move repo uploads to S01 (#1471) 2021-12-23 11:44:24 -05:00
Zac Sweers
2e15a3fa72 Update moshi version used for japicmp (#1459) 2021-12-12 04:03:03 -05:00
Jesse Wilson
7578984f25 Change the directory structure to match our modules (#1451) 2021-12-08 23:52:51 -05:00