-
Notifications
You must be signed in to change notification settings - Fork 758
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement reflective support for Java Records (#1381)
* 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 3eb768f. * 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
- Loading branch information
Showing
20 changed files
with
653 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright (C) 2021 Square, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
plugins { | ||
`java-library` | ||
} | ||
|
||
tasks.withType<JavaCompile>().configureEach { | ||
options.release.set(16) | ||
} | ||
|
||
dependencies { | ||
testImplementation(project(":moshi")) | ||
testCompileOnly(Dependencies.jsr305) | ||
testImplementation(Dependencies.Testing.junit) | ||
testImplementation(Dependencies.Testing.truth) | ||
} |
Oops, something went wrong.