Skip to content

Commit

Permalink
Add autoValueGson
Browse files Browse the repository at this point in the history
AutoValueGson allows deserializing objects created from Auto_value classes

Closes #17300.

PiperOrigin-RevId: 505706165
Change-Id: Icb4bbb3f6f696da4f437d6e40094613428c27193
  • Loading branch information
SalmaSamy authored and hvadehra committed Feb 14, 2023
1 parent 150eb63 commit 4a1e85e
Show file tree
Hide file tree
Showing 3 changed files with 243 additions and 25 deletions.
7 changes: 5 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,19 @@ maven.install(
"com.google.errorprone:error_prone_annotations:2.16",
"com.google.errorprone:error_prone_type_annotations:2.16",
"com.google.code.findbugs:jsr305:3.0.2",
"com.squareup:javapoet:1.12.0",
"com.google.j2objc:j2objc-annotations:1.3",
"com.github.stephenc.jcip:jcip-annotations:1.0-1",
"org.checkerframework:checker-qual:3.12.0",
"com.ryanharter.auto.value:auto-value-gson-extension:1.3.1",
"com.ryanharter.auto.value:auto-value-gson-runtime:1.3.1",
"com.ryanharter.auto.value:auto-value-gson-factory:1.3.1",
],
repositories = [
"https://dl.google.com/android/maven2",
"https://repo1.maven.org/maven2",
],
# TODO(pcloudy): Re-enable lock file after updating maven_install.json
# lock_file = "//:maven_install.json",
lock_file = "//:maven_install.json",
)

use_repo(maven, "maven")
Expand Down
47 changes: 26 additions & 21 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -611,45 +611,50 @@ load("@rules_jvm_external//:defs.bzl", "maven_install")

maven_install(
artifacts = [
"com.google.guava:guava:31.1-jre",
"com.google.guava:guava-testlib:31.1-jre",
"com.google.guava:failureaccess:1.0.1",
"com.google.errorprone:error_prone_annotations:2.16",
"com.google.errorprone:error_prone_type_annotations:2.16",
"com.google.code.findbugs:jsr305:3.0.2",
"com.google.j2objc:j2objc-annotations:1.3",
"com.github.stephenc.jcip:jcip-annotations:1.0-1",
"org.checkerframework:checker-qual:3.12.0",
"com.google.guava:guava:31.1-jre",
"com.google.guava:guava-testlib:31.1-jre",
"com.google.guava:failureaccess:1.0.1",
"com.google.errorprone:error_prone_annotations:2.16",
"com.google.errorprone:error_prone_type_annotations:2.16",
"com.google.code.findbugs:jsr305:3.0.2",
"com.google.j2objc:j2objc-annotations:1.3",
"com.github.stephenc.jcip:jcip-annotations:1.0-1",
"org.checkerframework:checker-qual:3.12.0",
"com.google.code.gson:gson:2.8.6",
"com.squareup:javapoet:1.12.0",
"com.ryanharter.auto.value:auto-value-gson-extension:1.3.1",
"com.ryanharter.auto.value:auto-value-gson-runtime:1.3.1",
"com.ryanharter.auto.value:auto-value-gson-factory:1.3.1",
],
maven_install_json = "//:maven_install.json",
repositories = [
"https://dl.google.com/android/maven2",
"https://repo1.maven.org/maven2",
],
maven_install_json = "//:maven_install.json",
)

load("@maven//:defs.bzl", "pinned_maven_install")
pinned_maven_install()

pinned_maven_install()

maven_install(
name = "maven_android",
name = "maven_android",
artifacts = [
"com.android.tools.build:builder:7.1.3",
"com.android.tools.build:manifest-merger:30.1.3",
"com.android.tools:sdk-common:30.1.3",
"com.android.tools:annotations:30.1.3",
"com.android.tools.layoutlib:layoutlib-api:30.1.3",
"com.android.tools:common:30.1.3",
"com.android.tools:repository:30.1.3",
"com.android.tools.build:builder:7.1.3",
"com.android.tools.build:manifest-merger:30.1.3",
"com.android.tools:sdk-common:30.1.3",
"com.android.tools:annotations:30.1.3",
"com.android.tools.layoutlib:layoutlib-api:30.1.3",
"com.android.tools:common:30.1.3",
"com.android.tools:repository:30.1.3",
],
maven_install_json = "//src/tools/android:maven_android_install.json",
repositories = [
"https://dl.google.com/android/maven2",
"https://repo1.maven.org/maven2",
],
maven_install_json = "//src/tools/android:maven_android_install.json",
)

load("@maven_android//:defs.bzl", pinned_maven_install_android = "pinned_maven_install")
pinned_maven_install_android()

pinned_maven_install_android()
214 changes: 212 additions & 2 deletions maven_install.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"dependency_tree": {
"__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL",
"__INPUT_ARTIFACTS_HASH": 1039122131,
"__RESOLVED_ARTIFACTS_HASH": 1665684790,
"__INPUT_ARTIFACTS_HASH": -187129178,
"__RESOLVED_ARTIFACTS_HASH": 1654435947,
"conflict_resolution": {},
"dependencies": [
{
Expand All @@ -20,6 +20,52 @@
"sha256": "4fccff8382aafc589962c4edb262f6aa595e34f1e11e61057d1c6a96e8fc7323",
"url": "https://repo1.maven.org/maven2/com/github/stephenc/jcip/jcip-annotations/1.0-1/jcip-annotations-1.0-1.jar"
},
{
"coord": "com.google.auto.value:auto-value-annotations:1.7",
"dependencies": [],
"directDependencies": [],
"file": "v1/https/repo1.maven.org/maven2/com/google/auto/value/auto-value-annotations/1.7/auto-value-annotations-1.7.jar",
"mirror_urls": [
"https://repo1.maven.org/maven2/com/google/auto/value/auto-value-annotations/1.7/auto-value-annotations-1.7.jar",
"https://dl.google.com/android/maven2/com/google/auto/value/auto-value-annotations/1.7/auto-value-annotations-1.7.jar"
],
"packages": [
"com.google.auto.value",
"com.google.auto.value.extension.memoized"
],
"sha256": "b134bab5082e9f49f2b45802573c78e0726e059b645323645da03e328e501f86",
"url": "https://repo1.maven.org/maven2/com/google/auto/value/auto-value-annotations/1.7/auto-value-annotations-1.7.jar"
},
{
"coord": "com.google.auto.value:auto-value:1.7",
"dependencies": [],
"directDependencies": [],
"file": "v1/https/repo1.maven.org/maven2/com/google/auto/value/auto-value/1.7/auto-value-1.7.jar",
"mirror_urls": [
"https://repo1.maven.org/maven2/com/google/auto/value/auto-value/1.7/auto-value-1.7.jar",
"https://dl.google.com/android/maven2/com/google/auto/value/auto-value/1.7/auto-value-1.7.jar"
],
"packages": [
"autovalue.shaded.com.google$.auto.common",
"autovalue.shaded.com.google$.common.annotations",
"autovalue.shaded.com.google$.common.base",
"autovalue.shaded.com.google$.common.collect",
"autovalue.shaded.com.google$.common.math",
"autovalue.shaded.com.google$.common.primitives",
"autovalue.shaded.com.google$.common.reflect",
"autovalue.shaded.com.google$.escapevelocity",
"autovalue.shaded.com.google$.j2objc.annotations",
"autovalue.shaded.com.squareup.javapoet$",
"autovalue.shaded.net.ltgt.gradle.incap$",
"autovalue.shaded.org.checkerframework$.checker.nullness.qual",
"autovalue.shaded.org.checkerframework$.framework.qual",
"com.google.auto.value.extension",
"com.google.auto.value.extension.memoized.processor",
"com.google.auto.value.processor"
],
"sha256": "b66df6984d5c29f15a6253514c817fb046e8e242efffc79e42c33f2dde0edf41",
"url": "https://repo1.maven.org/maven2/com/google/auto/value/auto-value/1.7/auto-value-1.7.jar"
},
{
"coord": "com.google.code.findbugs:jsr305:3.0.2",
"dependencies": [],
Expand All @@ -37,6 +83,28 @@
"sha256": "766ad2a0783f2687962c8ad74ceecc38a28b9f72a2d085ee438b7813e928d0c7",
"url": "https://repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar"
},
{
"coord": "com.google.code.gson:gson:2.8.6",
"dependencies": [],
"directDependencies": [],
"file": "v1/https/repo1.maven.org/maven2/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar",
"mirror_urls": [
"https://repo1.maven.org/maven2/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar",
"https://dl.google.com/android/maven2/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar"
],
"packages": [
"com.google.gson",
"com.google.gson.annotations",
"com.google.gson.internal",
"com.google.gson.internal.bind",
"com.google.gson.internal.bind.util",
"com.google.gson.internal.reflect",
"com.google.gson.reflect",
"com.google.gson.stream"
],
"sha256": "c8fb4839054d280b3033f800d1f5a97de2f028eb8ba2eb458ad287e536f3f25f",
"url": "https://repo1.maven.org/maven2/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar"
},
{
"coord": "com.google.errorprone:error_prone_annotations:2.16",
"dependencies": [],
Expand Down Expand Up @@ -195,6 +263,148 @@
"sha256": "21af30c92267bd6122c0e0b4d20cccb6641a37eaf956c6540ec471d584e64a7b",
"url": "https://repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar"
},
{
"coord": "com.ryanharter.auto.value:auto-value-gson-extension:1.3.1",
"dependencies": [
"com.google.auto.value:auto-value-annotations:1.7",
"com.google.auto.value:auto-value:1.7",
"com.google.code.gson:gson:2.8.6",
"com.ryanharter.auto.value:auto-value-gson-runtime:1.3.1",
"com.squareup:javapoet:1.12.0",
"io.sweers.autotransient:autotransient:1.0.0"
],
"directDependencies": [
"com.google.auto.value:auto-value-annotations:1.7",
"com.google.auto.value:auto-value:1.7",
"com.google.code.gson:gson:2.8.6",
"com.ryanharter.auto.value:auto-value-gson-runtime:1.3.1",
"com.squareup:javapoet:1.12.0"
],
"file": "v1/https/repo1.maven.org/maven2/com/ryanharter/auto/value/auto-value-gson-extension/1.3.1/auto-value-gson-extension-1.3.1.jar",
"mirror_urls": [
"https://repo1.maven.org/maven2/com/ryanharter/auto/value/auto-value-gson-extension/1.3.1/auto-value-gson-extension-1.3.1.jar",
"https://dl.google.com/android/maven2/com/ryanharter/auto/value/auto-value-gson-extension/1.3.1/auto-value-gson-extension-1.3.1.jar"
],
"packages": [
"autovaluegson.shaded.com.google.auto.common",
"autovaluegson.shaded.com.google.common.annotations",
"autovaluegson.shaded.com.google.common.base",
"autovaluegson.shaded.com.google.common.cache",
"autovaluegson.shaded.com.google.common.collect",
"autovaluegson.shaded.com.google.common.escape",
"autovaluegson.shaded.com.google.common.eventbus",
"autovaluegson.shaded.com.google.common.graph",
"autovaluegson.shaded.com.google.common.hash",
"autovaluegson.shaded.com.google.common.html",
"autovaluegson.shaded.com.google.common.io",
"autovaluegson.shaded.com.google.common.math",
"autovaluegson.shaded.com.google.common.net",
"autovaluegson.shaded.com.google.common.primitives",
"autovaluegson.shaded.com.google.common.reflect",
"autovaluegson.shaded.com.google.common.util.concurrent",
"autovaluegson.shaded.com.google.common.xml",
"com.ryanharter.auto.value.gson"
],
"sha256": "261be84be30a56994e132d718a85efcd579197a2edb9426b84c5722c56955eca",
"url": "https://repo1.maven.org/maven2/com/ryanharter/auto/value/auto-value-gson-extension/1.3.1/auto-value-gson-extension-1.3.1.jar"
},
{
"coord": "com.ryanharter.auto.value:auto-value-gson-factory:1.3.1",
"dependencies": [
"com.google.auto.value:auto-value-annotations:1.7",
"com.google.auto.value:auto-value:1.7",
"com.google.code.gson:gson:2.8.6",
"com.ryanharter.auto.value:auto-value-gson-extension:1.3.1",
"com.ryanharter.auto.value:auto-value-gson-runtime:1.3.1",
"com.squareup:javapoet:1.12.0",
"io.sweers.autotransient:autotransient:1.0.0"
],
"directDependencies": [
"com.google.auto.value:auto-value-annotations:1.7",
"com.google.code.gson:gson:2.8.6",
"com.ryanharter.auto.value:auto-value-gson-extension:1.3.1",
"com.squareup:javapoet:1.12.0"
],
"file": "v1/https/repo1.maven.org/maven2/com/ryanharter/auto/value/auto-value-gson-factory/1.3.1/auto-value-gson-factory-1.3.1.jar",
"mirror_urls": [
"https://repo1.maven.org/maven2/com/ryanharter/auto/value/auto-value-gson-factory/1.3.1/auto-value-gson-factory-1.3.1.jar",
"https://dl.google.com/android/maven2/com/ryanharter/auto/value/auto-value-gson-factory/1.3.1/auto-value-gson-factory-1.3.1.jar"
],
"packages": [
"autovaluegson.factory.shaded.com.google.auto.common",
"autovaluegson.factory.shaded.com.google.common.annotations",
"autovaluegson.factory.shaded.com.google.common.base",
"autovaluegson.factory.shaded.com.google.common.cache",
"autovaluegson.factory.shaded.com.google.common.collect",
"autovaluegson.factory.shaded.com.google.common.escape",
"autovaluegson.factory.shaded.com.google.common.eventbus",
"autovaluegson.factory.shaded.com.google.common.graph",
"autovaluegson.factory.shaded.com.google.common.hash",
"autovaluegson.factory.shaded.com.google.common.html",
"autovaluegson.factory.shaded.com.google.common.io",
"autovaluegson.factory.shaded.com.google.common.math",
"autovaluegson.factory.shaded.com.google.common.net",
"autovaluegson.factory.shaded.com.google.common.primitives",
"autovaluegson.factory.shaded.com.google.common.reflect",
"autovaluegson.factory.shaded.com.google.common.util.concurrent",
"autovaluegson.factory.shaded.com.google.common.xml",
"com.ryanharter.auto.value.gson.factory"
],
"sha256": "5a76c3d401c984999d59868f08df05a15613d1428f7764fed80b722e2a277f6c",
"url": "https://repo1.maven.org/maven2/com/ryanharter/auto/value/auto-value-gson-factory/1.3.1/auto-value-gson-factory-1.3.1.jar"
},
{
"coord": "com.ryanharter.auto.value:auto-value-gson-runtime:1.3.1",
"dependencies": [
"com.google.code.gson:gson:2.8.6",
"io.sweers.autotransient:autotransient:1.0.0"
],
"directDependencies": [
"com.google.code.gson:gson:2.8.6",
"io.sweers.autotransient:autotransient:1.0.0"
],
"file": "v1/https/repo1.maven.org/maven2/com/ryanharter/auto/value/auto-value-gson-runtime/1.3.1/auto-value-gson-runtime-1.3.1.jar",
"mirror_urls": [
"https://repo1.maven.org/maven2/com/ryanharter/auto/value/auto-value-gson-runtime/1.3.1/auto-value-gson-runtime-1.3.1.jar",
"https://dl.google.com/android/maven2/com/ryanharter/auto/value/auto-value-gson-runtime/1.3.1/auto-value-gson-runtime-1.3.1.jar"
],
"packages": [
"com.ryanharter.auto.value.gson",
"com.ryanharter.auto.value.gson.internal"
],
"sha256": "84ee23b7989d4bf19930b5bd3d03c0f2efb9e73bcee3a0208a9d1b2e1979c049",
"url": "https://repo1.maven.org/maven2/com/ryanharter/auto/value/auto-value-gson-runtime/1.3.1/auto-value-gson-runtime-1.3.1.jar"
},
{
"coord": "com.squareup:javapoet:1.12.0",
"dependencies": [],
"directDependencies": [],
"file": "v1/https/repo1.maven.org/maven2/com/squareup/javapoet/1.12.0/javapoet-1.12.0.jar",
"mirror_urls": [
"https://repo1.maven.org/maven2/com/squareup/javapoet/1.12.0/javapoet-1.12.0.jar",
"https://dl.google.com/android/maven2/com/squareup/javapoet/1.12.0/javapoet-1.12.0.jar"
],
"packages": [
"com.squareup.javapoet"
],
"sha256": "2b70cdfa8c9e997b4007035a266c273c0df341f9c57c9d0b45a680ae3fd882db",
"url": "https://repo1.maven.org/maven2/com/squareup/javapoet/1.12.0/javapoet-1.12.0.jar"
},
{
"coord": "io.sweers.autotransient:autotransient:1.0.0",
"dependencies": [],
"directDependencies": [],
"file": "v1/https/repo1.maven.org/maven2/io/sweers/autotransient/autotransient/1.0.0/autotransient-1.0.0.jar",
"mirror_urls": [
"https://repo1.maven.org/maven2/io/sweers/autotransient/autotransient/1.0.0/autotransient-1.0.0.jar",
"https://dl.google.com/android/maven2/io/sweers/autotransient/autotransient/1.0.0/autotransient-1.0.0.jar"
],
"packages": [
"io.sweers.autotransient"
],
"sha256": "914ce84508410ee1419514925f93b1855a9f7a7b5b5d02fc07f411d2a45f1bba",
"url": "https://repo1.maven.org/maven2/io/sweers/autotransient/autotransient/1.0.0/autotransient-1.0.0.jar"
},
{
"coord": "junit:junit:4.13.2",
"dependencies": [
Expand Down

0 comments on commit 4a1e85e

Please sign in to comment.