* Update to KSP 1.0.1 and use new jvm modifiers resolver API
This allows us to fully support transient across compilation boundaries
* Copy in KSP-supported KCT for now
* Update CI refs
* Move up transient check to the right place
Wasn't actually looking at the added annotation later 🤧
* Try regular RC?
* Skip that matrix for now
* Default Json.name to an unset value
* Promote shared transient tests to DualKotlinTest
* Add new ignore property to Json
* Support it in ClassJsonAdapter
* Mention no enum/record support
* Support in KotlinJsonAdapter
* Rework code gen API to know of "ignored"
* Support in apt code gen
* Support in KSP
* Update old non-working transient example test
* Synthetic holders
* Use field on both
* Only assign setters if present
Rather than generating
```kotlin
val result: Content
result = Content()
result.content = if (contentSet) content else result.content
result.text = if (textSet) text else result.text
```
This will now conditionally set
```kotlin
val result: Content
result = Content()
if (contentSet) {
result.content = content
}
if (textSet) {
result.text = text
}
```
* Spotless
* Standardize around JDK 8
* Update GJF to support newer JDKs
* Fix misc java 8 issues in tests
* Prepare java 16/records checking at runtime
* Implement real RecordJsonAdapter
* Spotless
* Prepare build for JDK 16+
* Fix property name for kapt
* Small cleanup
* Make FallbackEnum java-8 happy
* Remove animalsniffer
* Fix format
* Add opens for ExtendsPlatformClassWithProtectedFields
* Return null every time in shim for main tests
* Use JDK 16 + release 8 to replace animalsniffer
* Simplify accessor accessible handling
* Remove manifest attrs
* Fix typo
* Fix KCT tests + upgrade it
* Cover another
* Try explicit kotlin daemon args for java 17?
* Disable 17-ea for now until kotlin 1.5.30
* Add JsonQualifier and Json(name) tests + fix qualifiers
* Ensure constructor is accessible
* GJF it properly
* GJF 1.11
* Unwrap InvocationTargetException
* Use MethodHandle for constructor
* Use MethodHandle for accessor too
* Revert "Remove manifest attrs"
This reverts commit 3eb768fd6904bb5c979aa01c3c182e0fb9329d62.
* Proper MR jar
* *actually* fix GJF, which wasn't getting applied before
We can just enable this everywhere now since we require JDK 16 anyway
* Make IDE happy about modules access
* Fixup records tests to play nice with modules
Gotta be public
* Add complex smoke test
* Remove comment
Not a regression test in this case
One example I found for this is when a property is annotated with android's `@SuppressLint`, which is only available from the android jar and not visible during apt. This should just be a warning (if even?) and not a hard error.
* Update KotlinPoet to 1.7.2
* Fix a Java NPE crash when processing a parameter annotated with an annotation that placed in annotation package
This problem happens with KotlinPoet 1.7.x.
From KotlinPoet 1.7.x, `TypeName.toString()` is escaped with backquotes if the package name contains keywords.
So NPE will be thrown if an annotation is placed in `annotation` package because `elements.getTypeElement(it.typeName.toString())` returns `null`.
* Reformat imports
* Use rawType().canonicalName instead of toString()
* Fix test case
* Require getTypeElement
* Exclude com.google.guava from shadowJar
* Move a test case of processing a qualifier placed in `annotation` package
* Use checkNull instead
* Make moshi-root a kotlin project
* Move moshi kotlin extensions to moshi core
* Add appropriate experimental annotations
* Add nextAdapter helper
* Add explicit return type on addAdapter
* Expression body for adapter
* Use nextAdapter helper
* Opportunistically fix a couple Util warnings
* Add Types extensions
* Spotless
* Use extensions in more places for added coverage
* Apply java versions on any java plugin type
This way the kotlin projects get this too
* Fix circularAdapters test?
* Use java 8 in java for code gen too
* Fixup with CircularAdaptersTest
* Add coverage for remaining
* Remove nextAdapter
* Remove leftover function
* Use asserts
left checkNotNull for the contract
* boxIfPrimitive
* Fixup docs
* Copyright fixes
* Add parameterized addAdapter
* Switch to using native javaType API
* Spotless
* Back to 2019
* Spotless
* Use rawType extension
* Fix rebase issues
* Start recipes module with JsonString recipe
* Make recipes a kotlin project
* Move JsonString sample to examples
* Add license
* Include all java modules
* Add kotlin options
* Spotless
* Remove jvmtarget
I was today years old when I found out 1.7 isn't a valid target
* Make gradle happy
* Add codegen
* Spotless
* Update spotless and enable copyright header bits again
* Reformat square copyright headers
* Create separate format configuration for external files
* Update CI to use java 15 final
* include stacktrace in ci failures
* Update ktlint to 0.39
* Disable java formatting on JDK 15
* Fix google header
* Update to shadow 6.0
* Exclude kotlinpoet core artifact from shading
* Replace runtime scopes with compile
* Opportunistically fix old artifact() dep
Gradle 6.6 supports providers now
* Use api instead
* Add link
* Remove accidental gradle plugin config
This only applies to gradle plugins
* Update Okio to latest
* Update kotlin-compile-testing to 1.2.10
* Update to KtLint 0.38.1
No changes affecting moshi, just support for mixing multiple kotlin versions in a project
* Opportunistic disable kotlin-dsl warning
This is noisy on every build
* Update maven publish to 0.12.0
* Start gradle root
* Clean up test API ambiguities
These don't compile in gradle anymore and the team[] warns
* Exclude .gradle dirs in git
* Set up moshi module
* Set up moshi-adapters
* Add repositories to subprojects
* Set target/source compatibility
* Set up examples
* Fix location of reflect/test dir
* Set up moshi-kotlin
* Set up code gen
* Opportunistic update code gen deps
* Fix up with code gen
* Set up kotlin tests
* Update snapshots
* Update travis build
* Configure checkstyle
* Cache gradle
* Finish fixing up checkstyle
* Now disable checkstyle until we can fix them all :|
* Update contributing
* Fix tests in codegen
* Remove unnecessary annotation
* Remove maven stuff!
* Suppress warning
* Remove jcenter
* Consolidate dependencies
* Revert "Clean up test API ambiguities"
This reverts commit 3ead69b844b5d7f66134b721e95581f5df1cccd6.
* Fix incap dep
* Opportunistically fix some small kotlinpoet deprecations
* Automatically apply the stdlib to all kotlin projects
* Opportunistic move to opt-in and remove unnecessary annotations
The kotlin maven plugin didn't handle these well in the IDE, gradle does
* Fix Type doc warning
* Fix okio version
* Fix dokka support
* Fix copypasta
* Use new snapshot
* Kotlin 1.4.0
* Update to Kotlin 1.4.0
* Remove moshi-kotlin rules in favor of Kotlin's
* Ignore tests for now
* Update to OptIn
* Update test for kotlin 1.4 behavior
* Fix reflection names in generated proguard files
Proguard wants to speak reflection names
* Opportunistic clean up proguard tests
This ensures we fail the test if there are any unexpected ones