Commit graph

21 commits

Author SHA1 Message Date
Eric Cochran
e7c745aac8 Make generated adapters null-safe.
This is in alignment with the lookup for Java and Kotlin reflective adapters.
2018-09-10 16:31:24 -07:00
Jesse Wilson
c008e0e2b6 Test support for uppercase property names
I couldn't reproduce the reported issue.

Closes: https://github.com/square/moshi/issues/574
2018-09-09 23:25:56 -04:00
Jesse Wilson
1ba07d4b7d Test that @Transient private properties are ignored
Closes: https://github.com/square/moshi/issues/643
2018-09-09 23:17:50 -04:00
Jesse Wilson
cb86194f8f
Merge pull request #651 from square/jwilson.0909.enclosed_parameterized
Call Types.newParameterizedTypeWithOwner when necessary.
2018-09-09 23:16:38 -04:00
Jesse Wilson
306664fb6a Call Types.newParameterizedTypeWithOwner when necessary.
Otherwise we crash with an exception attempting to create an adapter
for an enclosed type that has a type parameter.

I ran into this looking for a test case for issue 615.
https://github.com/square/moshi/issues/615
2018-09-09 17:05:33 -04:00
Jesse Wilson
7382145318 Change DelegateKey to use AnnotationSpec instead of AnnotationMirror
AnnotationSpec implements equals() in the way we need, but
AnnotationMirror doesn't. As a consequence this fixes a problem
where we were generating redundant adapters.

Closes: https://github.com/square/moshi/issues/563
2018-09-09 15:27:21 -04:00
Jesse Wilson
f5fe86dd78 Confirm you can use codegen with adapter methods
We had a bug report that said using just @ToJson wasn't working.
This test attempts to show it should work just fine.

https://github.com/square/moshi/issues/545
2018-09-09 12:16:18 -04:00
Jesse Wilson
354db6b46f
Merge pull request #627 from square/eric.2018-08-17.boxed-primitive-adapters
Make nullable primitives in codegen use boxed type adapters.
2018-08-19 07:36:12 -04:00
Eric Cochran
1b17423343 Make nullable primitives in codegen use boxed type adapters. 2018-08-17 13:41:43 -07:00
Jesse Wilson
9ea1f845a8 Generate Kotlin documentation with Dokka 2018-08-14 20:20:15 -04:00
Jesse Wilson
34f8f9472f
Merge pull request #612 from square/jwilson.0805.extension_property
Test to confirm that extension properties are not encoded or decoded
2018-08-06 04:36:34 -04:00
Jesse Wilson
c360a1c840 Test to confirm that extension properties are not encoded or decoded 2018-08-05 22:20:25 -04:00
Eric Cochran
248be5805b Fix dollar sign escaping for json key names. 2018-07-24 18:03:23 -07:00
Eric Cochran
4666e06910 Allow private transient Kotlin properties. 2018-06-06 17:12:29 -07:00
Zac Sweers
3ecdfb6374 Fix generic typealiases (#551)
* Add generic type alias

* Fix missing resolveAliases check to fix generics

* Reword to useAbbreviatedType
2018-05-17 22:06:43 -04:00
Zac Sweers
b956b06f6d Fix companion object names not being resolved (#549)
* Fix companion object names not being resolved

This slipped through the cracks before the release

Fixes #546

* Add braces on the else clause for symmetry
2018-05-16 15:44:07 -04:00
Jesse Wilson
31ef245eeb [maven-release-plugin] prepare for next development iteration 2018-05-14 23:00:15 -04:00
Jesse Wilson
bf4d1f8693 [maven-release-plugin] prepare release moshi-parent-1.6.0 2018-05-14 23:00:02 -04:00
Jesse Wilson
dd84b9f8f8 Change the Kotlin reflection adapter to yield to the codegen adapter 2018-05-14 21:07:46 -04:00
Jesse Wilson
60cb608956 Move Kotlin reflection into a kotlin/reflect directory
The maven coordinates stay the same.
2018-05-14 17:28:28 -04:00
Jesse Wilson
9f69029ef0 Move the Kotlin code generator to the kotlin/ module 2018-05-14 16:29:52 -04:00