Artem Daugel-Dauge
0e3a52b729
Use javaObjectType instead of Java primitives while creating parametrized type ( #731 )
...
* Add test for collection of primitives
* Use javaObjectType instead of Java primitives while creating parametrized type
2018-11-04 09:42:51 -08:00
Artem Daugel-Dauge
e0be5f5a54
Fix variance issues
2018-11-04 17:11:22 +03:00
Jesse Wilson
a5d35730de
Don't use @Language when the literal includes a dollar sign
...
It makes IntelliJ grumpy.
https://youtrack.jetbrains.com/issue/KT-27224
2018-09-27 09:45:44 -04:00
Zac Sweers
86c8671d64
Completely remove companion object jsonAdapter extension function gen
...
It's broken currently (see #611 ), and after talking with @swankjesse decided it's best to just nix this API
2018-09-25 00:58:52 -04:00
Jesse Wilson
2cb81857ac
[maven-release-plugin] prepare for next development iteration
2018-09-24 22:55:49 -04:00
Jesse Wilson
9a652f8788
[maven-release-plugin] prepare release moshi-parent-1.7.0
2018-09-24 22:55:35 -04:00
Jesse Wilson
735f0c39f7
Upgrade Kotlin, AssertJ, compile-testing, and kotlin-metadata dependencies
2018-09-24 21:48:25 -04:00
Eric Cochran
8e151b1df3
Allow user adapters to convert null to non-null in codegen.
...
Delegate to installed adapters instead of checking for null.
2018-09-11 22:25:42 -07:00
Jesse Wilson
c04f1bafde
Don't do Kotlin reflection on a non-Kotlin class.
...
Closes: https://github.com/square/moshi/issues/662
2018-09-11 21:50:02 -04:00
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