Commit Graph

17 Commits

Author SHA1 Message Date
renovate[bot]
8d54b3baf5 Update dependency com.squareup.moshi:moshi to v1.15.0 (#1676)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-21 14:07:31 -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
Jesse Wilson
c9f8c56efc Update changelog for 1.14.0 2022-09-06 14:36:42 -04:00
Zac Sweers
b2a67760d4 Explicitly denote util public APIs in japicmp (#1511) 2022-01-21 17:22:13 -05:00
Spencer Griffin
9e5fc24f4f Convert ClassJsonAdapter to kotlin (#1470) 2022-01-19 00:25:06 -05:00
Spencer Griffin
57df98b9b1 Convert AdapterMethodsFactory.java to kotlin (#1467)
* Rename AdapterMethodsFactory from java to kt

* Convert AdapterMethodsFactory.java to AdapterMethodsFactory.kt

* Make kotlin more idiomatic

* Use forEach loop

* Spotless

* More idiomatic kotlin

* Inline toString

* Address comments from PR

* Address comments in PR review

* Spotless

* Use templated string for error message

* Add japicmp exclusion for internal AdapterMethodsFacotry#get method

* Convert if to when

* Convert if to when

* Use templated strings

* Replace forEach with for loop

* Simplify expression

* Add local val to avoid cast

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

Co-authored-by: Zac Sweers <pandanomic@gmail.com>

* Better variable names

* Exclude entire AdapterMethodsFactory class in japicmp

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

Co-authored-by: Zac Sweers <pandanomic@gmail.com>

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

Co-authored-by: Zac Sweers <pandanomic@gmail.com>

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

Co-authored-by: Zac Sweers <pandanomic@gmail.com>

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

Co-authored-by: Zac Sweers <pandanomic@gmail.com>

* Import knownNotNull

* Add requireNull in Util to create error message

* Rename argument

* Convert error message to raw string

* Use generateSequence to iterate through the superclasses

* Use it rather than complicated name

* Rename requireNull to checkNull, and remove contract

* Fix tests since error type changed

* Update moshi/src/main/java/com/squareup/moshi/internal/Util.kt

Co-authored-by: Spencer Griffin <sgriffin@ancestry.com>
Co-authored-by: Zac Sweers <pandanomic@gmail.com>
2022-01-18 22:45:42 -05:00
Spencer Griffin
ff2f6e18d2 Convert ArrayJsonAdapter.java to kotlin (#1468)
Co-authored-by: Zac Sweers <pandanomic@gmail.com>
Co-authored-by: Spencer Griffin <sgriffin@ancestry.com>
2022-01-12 13:42:42 -05:00
Zac Sweers
396342b06b Convert RecordJsonAdapter to Kotlin (#1493) 2022-01-11 15:39:31 -05:00
Zac Sweers
d7b70637d2 Convert MapJsonAdapter to Kotlin (#1492)
* Rename .java to .kt

* Convert MapJsonAdapter to Kotlin

* Pull up factory into companion object

* Spotless

* apicmp

* Use knownNotNull

* Use a template
2022-01-10 12:22:15 -05:00
Zac Sweers
6e81499501 Convert StandardJsonAdapters to Kotlin (#1494)
* Rename .java to .kt

* Convert StandardJsonAdapters to Kotlin

* Inline factory to object

* Idiomatic cleanups + japicmp

* Fixes

* Another idiomatatic bit

* Use knownNotNull() where applicable
2022-01-10 12:14:07 -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
2daf78337d Convert Collection adapter to Kotlin (#1485)
* Consolidate contract utils

* Rename .java to .kt

* Convert CollectionJsonAdapter to Kotlin

* Lift factory into companion object

* Update moshi/src/main/java/com/squareup/moshi/internal/Util.kt
2022-01-10 11:07:57 -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
Zac Sweers
6947ab00d0 Modernize build a bit (#1383) 2021-08-23 17:09:59 -04:00
Zac Sweers
b33a94dfc1 Update more dependencies (#1319) 2021-03-29 21:37:54 -04:00
Zac Sweers
6e5bb3a29b Prepare project for Kotlin migration (#1257) 2021-02-02 13:11:38 -05:00