Commit Graph

1070 Commits

Author SHA1 Message Date
Jake Wharton
ce78d34c14 Merge pull request #1379 from Goooler/gradle
Update gradle 7.2
2021-08-17 08:32:24 -04:00
Goooler
c1f5ce2b1b Update gradle 7.2 2021-08-17 19:52:43 +08:00
Jake Wharton
e41b79170e Merge pull request #1377 from Goooler/action
Disable publish action in forked repository
2021-08-16 10:55:33 -04:00
Jake Wharton
201a1d8a4b Merge pull request #1376 from Goooler/bump
Bump gradle to 7.1.1
2021-08-16 10:55:15 -04:00
Goooler
2eb40a0cff Disable publish action in forked repository 2021-08-16 22:29:22 +08:00
Goooler
6c2c578637 Bump gradle to 7.1.1 2021-08-16 22:19:00 +08:00
Jake Wharton
5379ac8539 Merge pull request #1374 from Goooler/attr
Add .gitattributes
2021-08-16 10:05:59 -04:00
Jake Wharton
620e340181 Merge pull request #1373 from Goooler/config
Add .editorconfig
2021-08-16 10:05:39 -04:00
Goooler
06cce171c6 Bump setup-java action to v2 2021-08-16 10:05:05 -04:00
Goooler
4bca55b113 Add .gitattributes 2021-08-16 17:04:42 +08:00
Goooler
6d48f16d1f Add .editorconfig 2021-08-16 17:03:24 +08:00
Zac Sweers
ce45a68cc3 Small grammar and naming followups for proguard gen (#1365) 2021-07-16 03:06:43 -04:00
Steve SeongUg Jung
72f464bbdc Add an argument to be disable proguard code generating (#1353)
Co-authored-by: SeongUg Jung <seongug.jung@hanwha.com>
Co-authored-by: Zac Sweers <pandanomic@gmail.com>
2021-07-15 21:24:31 -04:00
Dkhusainov
3c108919ee JsonReader.nextSource javadoc (#1350)
Co-authored-by: Dinar <d.khusainov@infotech.team>
2021-05-31 16:35:32 -04:00
Zac Sweers
e343751593 Update to Kotlin 1.5 (and associated deps) (#1339) 2021-05-07 12:51:33 -04:00
Zac Sweers
45c8595bfa Update to Gradle 7 + Kotlin 1.4.32 + AutoService 1.0 (#1334) 2021-04-10 13:03:34 -04:00
wrongwrong
9c17bb823f fix version on readme (#1333) 2021-04-07 10:34:17 -04:00
Yuichiro Kawano
1654313fee update version on README (#1332) 2021-04-05 19:44:39 -04:00
Jesse Wilson
aea17e09bc Prepare next development version. 2021-04-01 16:31:07 -04:00
Jesse Wilson
cdf9546df5 Prepare for release 1.12.0. 2021-04-01 16:30:45 -04:00
Zac Sweers
7372baaaa0 Invoke constructor directly if all params with default are set (#1326)
Resolves #1302
2021-03-29 21:47:22 -04:00
Zac Sweers
b33a94dfc1 Update more dependencies (#1319) 2021-03-29 21:37:54 -04:00
wrongwrong
37f34e16f0 Improve KotlinJsonAdapter performance by invoke KFunction by "call". (#1286) 2021-03-29 20:46:42 -04:00
Zac Sweers
bcfce60577 Warn on missing TypeElement rather than error (#1323)
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.
2021-03-29 20:44:55 -04:00
Ralf Wondratschek
7ef4a32d52 Bump the Kotlin JVM metadata library to the latest release. This will avoid problems with Kotlin 1.5.0-M2. (#1325) 2021-03-29 11:00:03 -04:00
Zac Sweers
797140c5cf Add some short basic docs to JsonAdapter methods (#1313) 2021-03-13 20:52:40 -05:00
Zac Sweers
103b60328c Improve readability of constructor invocation params (#1312) 2021-03-13 20:52:25 -05:00
Zac Sweers
3bc47519ab Fix reading property function types (#1311) 2021-03-13 20:47:52 -05:00
Zac Sweers
935f8b872a Support generic arrays with defaults in code gen (#1310) 2021-03-13 20:47:27 -05:00
Márton Braun
6df66b81dc Fix typo in PolymorphicJsonAdapterFactory.java (#1314) 2021-03-08 13:54:19 -05:00
Zac Sweers
9ac54dd33f Update dependencies (#1307)
* Gradle 6.8.2

* Truth 1.1.2

* Kotlin 1.4.30

* ASM 9.1

* Lower versions

These require java 8, which we don't actually formally support

* Gradle 6.8.3
2021-02-23 02:51:12 -05:00
Masatoshi Kubode
156b1f0365 Fix a crash when processing a parameter annotated with an annotation that placed in annotation package (#1287)
* 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
2021-02-22 02:43:04 -05:00
Zac Sweers
7f1e7e229e Suppress some poet deprecations (#1306) 2021-02-20 23:27:56 -05:00
Zac Sweers
99ebab66c0 Reserve simple type names referenced by properties to avoid collisions (#1305) 2021-02-15 13:02:28 -05:00
Zac Sweers
6b09dc443d Suppress RedundantVisibilityModifier in generated adapters (#1303) 2021-02-15 12:58:14 -05:00
Zac Sweers
6e5bb3a29b Prepare project for Kotlin migration (#1257) 2021-02-02 13:11:38 -05:00
Zac Sweers
8518f47f52 Update dependencies (#1258) 2021-02-02 13:11:20 -05:00
Zac Sweers
23d056c054 Add issue templates (#1254) 2021-02-01 18:00:03 -05:00
Alex Vanyo
f0202d5d29 Revert pull-request-target to pull-request (#1295) 2021-02-01 17:58:29 -05:00
Zac Sweers
9c2cd7a37b Use pull_request_target (#1255)
https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#pull_request_target
2020-10-10 07:52:57 -04:00
Zac Sweers
a6caf3ccac Run spotless on changelog (#1251) 2020-10-04 23:33:25 -04:00
Jesse Wilson
e135f5f31f Prepare next development version. 2020-10-04 20:52:28 -04:00
Jesse Wilson
4d3ca9a174 Prepare for release 1.11.0. 2020-10-04 20:52:00 -04:00
Zac Sweers
230c3d801f Promote Kotlin type-inferring APIs to the main Moshi package (round 2!) (#1202)
* 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
2020-10-04 18:18:52 -04:00
Zac Sweers
f17e7c2584 Fix infinite loop with type var variance stripping + remove from API (#1246)
* Add test case

* Add TypeVariableResolver to handle backward referencing type vars

* Copy nullability in typevars
2020-10-04 18:10:49 -04:00
Zac Sweers
5ce092857a Fix some misc deprecated KotlinPoet APIs (#1249)
* Move off of deprecated AnnotationSpec.className

* Simplify generatedType check and avoid deprecated KP API
2020-10-04 18:03:45 -04:00
Zac Sweers
850dc206cf Fix snapshots by upping metaspace size (#1247)
See https://github.com/Kotlin/dokka/issues/1405
2020-10-03 06:56:09 -04:00
sinha-shaurya
8fe26e934e Updated Moshi Download version to 1.10.0 2020-10-02 09:52:40 -04:00
Zac Sweers
f192473419 Standardize (almost) all tests on Truth (#1242)
* Replace assertj calls with Truth where possible

* Update test dependencies

* adapters

* reflect

* codegen

* moshi

* Add missing inOrder()

* Spotless
2020-09-26 20:38:39 -04:00
Jesse Wilson
acb2836d39 Merge pull request #1241 from ZacSweers/z/betterJcenterHandling
Use exclusiveContent API for jcenter
2020-09-26 16:01:05 -04:00