Commit ec7ec421 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Move GSON library into android_deps

Advantages to having it live under //android_deps:
* Maven version constraints are checked when resolving deps
* Consistency / ease of future updates

Bug: None
Change-Id: I715f0a00b88268556ff533e89ffa42ec6ebfb66e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2035868
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: default avatarPeter Wen <wnwen@chromium.org>
Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#737946}
parent 08739550
......@@ -400,7 +400,6 @@ check_targets = [
"//third_party/google_toolbox_for_mac/*",
"//third_party/google-truth/*",
"//third_party/gradle_wrapper/*",
"//third_party/gson/*",
"//third_party/guava/*",
"//third_party/gvr-android-keyboard/*",
"//third_party/gvr-android-sdk/*",
......
......@@ -993,17 +993,6 @@ deps = {
'condition': 'checkout_win',
},
'src/third_party/gson': {
'packages': [
{
'package': 'chromium/third_party/gson',
'version': '681931c9778045903a0ed59856ce2dd8dd7bf7ca',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/guava': {
'packages': [
{
......@@ -2969,6 +2958,17 @@ deps = {
'dep_type': 'cipd',
},
'src/third_party/android_deps/libs/com_google_code_gson_gson': {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/com_google_code_gson_gson',
'version': 'version:2.8.0-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/android_deps/libs/com_google_dagger_dagger': {
'packages': [
{
......
......@@ -97,7 +97,6 @@
/google_toolbox_for_mac/src
/googlemac
/grpc/src
/gson/lib/
/gvr-android-sdk/common_library.aar
/gvr-android-sdk/test-libraries/controller_test_api.aar
/gvr-android-sdk/libgvr_shim_static_*.a
......
......@@ -1101,6 +1101,13 @@ java_prebuilt("com_google_auto_service_auto_service_annotations_java") {
enable_bytecode_rewriter = false
}
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
java_prebuilt("com_google_code_gson_gson_java") {
jar_path = "libs/com_google_code_gson_gson/gson-2.8.0.jar"
output_name = "com_google_code_gson_gson"
enable_bytecode_rewriter = false
}
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
java_prebuilt("com_google_dagger_dagger_java") {
jar_path = "libs/com_google_dagger_dagger/dagger-2.17.jar"
......@@ -1806,8 +1813,8 @@ java_prebuilt("com_android_tools_build_jetifier_jetifier_core_java") {
# //third_party/android_deps/build.gradle.
visibility = [ ":*" ]
deps = [
":com_google_code_gson_gson_java",
":org_jetbrains_kotlin_kotlin_stdlib_java",
"//third_party/gson:gson_java",
]
skip_jetify = true
}
......
......@@ -127,6 +127,7 @@
"libs/com_google_auto_service_auto_service_annotations",
"libs/com_google_code_findbugs_jFormatString",
"libs/com_google_code_findbugs_jsr305",
"libs/com_google_code_gson_gson",
"libs/com_google_dagger_dagger",
"libs/com_google_dagger_dagger_compiler",
"libs/com_google_dagger_dagger_producers",
......
......@@ -132,20 +132,19 @@ dependencies {
// Matches version depended on by Dagger.
buildCompile "com.squareup:javapoet:1.11.0"
buildCompile "com.google.auto.service:auto-service-annotations:1.0-rc6"
buildCompile "com.google.auto.service:auto-service:1.0-rc6"
buildCompile "com.google.auto.service:auto-service-annotations:1.0-rc6"
buildCompile "com.google.code.gson:gson:2.8.0"
buildCompile "com.google.errorprone:error_prone_core:2.3.4"
// Jetify to androidx.
buildCompile "com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta08"
buildCompile "commons-cli:commons-cli:1.3.1"
buildCompile "org.ow2.asm:asm:7.0"
buildCompile "org.ow2.asm:asm-commons:7.0"
buildCompile "org.ow2.asm:asm-tree:7.0"
buildCompile "org.ow2.asm:asm-util:7.0"
// Jetify to androidx.
buildCompile "com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta08"
buildCompile "commons-cli:commons-cli:1.3.1"
// testCompile targets have test_only = true.
testCompile "androidx.test:core:1.0.0"
testCompile "androidx.test:monitor:1.1.0"
......
......@@ -35,7 +35,6 @@ class BuildConfigGenerator extends DefaultTask {
// Some libraries are hosted in Chromium's //third_party directory. This is a mapping between
// them so they can be used instead of android_deps pulling in its own copy.
private static final def EXISTING_LIBS = [
'com_google_code_gson_gson': '//third_party/gson:gson_java',
'junit_junit': '//third_party/junit:junit',
'org_hamcrest_hamcrest_core': '//third_party/hamcrest:hamcrest_core_java',
]
......
......@@ -39,6 +39,10 @@ class ChromiumDepGraph {
licenseName: "Apache 2.0"),
'com_google_code_findbugs_jFormatString': new PropertyOverride(
licenseUrl: "https://raw.githubusercontent.com/spotbugs/spotbugs/master/spotbugs/licenses/LICENSE.txt"),
'com_google_code_gson_gson': new PropertyOverride(
url: "https://github.com/google/gson",
licenseUrl: "https://raw.githubusercontent.com/google/gson/master/LICENSE",
licenseName: "Apache 2.0"),
'com_google_errorprone_error_prone_annotation': new PropertyOverride(
url: "https://errorprone.info/",
licenseUrl: "https://www.apache.org/licenses/LICENSE-2.0.txt"),
......
......@@ -199,4 +199,4 @@
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.
\ No newline at end of file
limitations under the License.
file://third_party/android_deps/OWNERS
\ No newline at end of file
Name: gson
Name: Gson
Short Name: gson
URL: https://github.com/google/gson
Version: 2.8.0
License: Apache 2.0
License File: NOT_SHIPPED
Security Critical: no
Description:
A Java serialization/deserialization library to convert Java Objects
into JSON and back.
Local Modifications: None
Local Modifications:
No modifications.
# Copyright 2017 The Chromium Authors. All rights reserved.
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# To create CIPD package run the following command.
# cipd create --pkg-def cipd.yaml -tag version:$(cat version.txt)
package: chromium/third_party/gson
description: gson Java library
# cipd create --pkg-def cipd.yaml -tag version:2.8.0-cr0
package: chromium/third_party/android_deps/libs/com_google_code_gson_gson
description: "Gson"
data:
- file: lib/gson.jar
- file: gson-2.8.0.jar
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/android/rules.gni")
java_prebuilt("gson_java") {
jar_path = "lib/gson.jar"
}
jbudorick@chromium.org
mikecase@chromium.org
yolandyan@chromium.org
# COMPONENT: Test>Android
......@@ -82,7 +82,7 @@ case "`uname`" in
esac
ANDROID_DEPS=$THIRD_PARTY_DIR/android_deps/libs
CLASSPATH=$APP_HOME/lib/jetifier-standalone.jar:$ANDROID_DEPS/com_android_tools_build_jetifier_jetifier_processor/jetifier-processor-1.0.0-beta08.jar:$ANDROID_DEPS/commons_cli_commons_cli/commons-cli-1.3.1.jar:$ANDROID_DEPS/com_android_tools_build_jetifier_jetifier_core/jetifier-core-1.0.0-beta08.jar:$ANDROID_DEPS/org_ow2_asm_asm_util/asm-util-7.0.jar:$ANDROID_DEPS/org_ow2_asm_asm_commons/asm-commons-6.0.jar:$ANDROID_DEPS/org_ow2_asm_asm_tree/asm-tree-7.0.jar:$ANDROID_DEPS/org_ow2_asm_asm/asm-7.0.jar:$ANDROID_DEPS/org_jdom_jdom2/jdom2-2.0.6.jar:$ANDROID_DEPS/org_jetbrains_kotlin_kotlin_stdlib/kotlin-stdlib-1.3.41.jar:$THIRD_PARTY_DIR/gson/lib/gson.jar:$ANDROID_DEPS/org_jetbrains_kotlin_kotlin_stdlib_common/kotlin-stdlib-common-1.3.41.jar:$ANDROID_DEPS/org_jetbrains_annotations/annotations-13.0.jar
CLASSPATH=$APP_HOME/lib/jetifier-standalone.jar:$ANDROID_DEPS/com_android_tools_build_jetifier_jetifier_processor/jetifier-processor-1.0.0-beta08.jar:$ANDROID_DEPS/commons_cli_commons_cli/commons-cli-1.3.1.jar:$ANDROID_DEPS/com_android_tools_build_jetifier_jetifier_core/jetifier-core-1.0.0-beta08.jar:$ANDROID_DEPS/org_ow2_asm_asm_util/asm-util-7.0.jar:$ANDROID_DEPS/org_ow2_asm_asm_commons/asm-commons-6.0.jar:$ANDROID_DEPS/org_ow2_asm_asm_tree/asm-tree-7.0.jar:$ANDROID_DEPS/org_ow2_asm_asm/asm-7.0.jar:$ANDROID_DEPS/org_jdom_jdom2/jdom2-2.0.6.jar:$ANDROID_DEPS/org_jetbrains_kotlin_kotlin_stdlib/kotlin-stdlib-1.3.41.jar:$ANDROID_DEPS/com_google_code_gson_gson/gson-2.8.0.jar:$ANDROID_DEPS/org_jetbrains_kotlin_kotlin_stdlib_common/kotlin-stdlib-common-1.3.41.jar:$ANDROID_DEPS/org_jetbrains_annotations/annotations-13.0.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
......
......@@ -168,11 +168,11 @@ java_annotation_processor("robolectric_processor") {
":robolectric_annotations_java",
":sdk_list_txt",
"//build/android:sun_tools_java",
"//third_party/android_deps:com_google_code_gson_gson_java",
"//third_party/android_deps:com_google_guava_guava_java",
"//third_party/android_deps:org_ow2_asm_asm_commons_java",
"//third_party/android_deps:org_ow2_asm_asm_java",
"//third_party/android_deps:org_ow2_asm_asm_tree_java",
"//third_party/gson:gson_java",
]
provider_configurations = [ "local/processor/src/main/resources/META-INF/services/javax.annotation.processing.Processor" ]
main_class = "org.robolectric.annotation.processing.RobolectricProcessor"
......@@ -873,8 +873,8 @@ java_library("shadows_core_java") {
# Note that gson is not a direct dependency for this library, but must be
# in the classpath when the Robolectric annotation processor runs.
"//third_party/android_deps:com_google_code_gson_gson_java",
"//third_party/android_deps:com_google_guava_guava_java",
"//third_party/gson:gson_java",
"//third_party/hamcrest:hamcrest_java",
"//third_party/icu4j:icu4j_java",
"//third_party/sqlite4java:sqlite4java_java",
......@@ -907,8 +907,8 @@ java_library("shadows_multidex_java") {
":shadows_core_java",
"//build/android:sun_tools_java",
"//third_party/android_deps:com_android_support_multidex_java",
"//third_party/android_deps:com_google_code_gson_gson_java",
"//third_party/android_deps:com_google_guava_guava_java",
"//third_party/gson:gson_java",
]
# Work-around for gradle generator not yet supporting annotation processors.
......@@ -943,8 +943,8 @@ java_library("shadows_play_services_java") {
"$google_play_services_package:google_play_services_base_java",
"$google_play_services_package:google_play_services_basement_java",
"//third_party/android_deps:android_support_v4_java",
"//third_party/android_deps:com_google_code_gson_gson_java",
"//third_party/android_deps:com_google_guava_guava_java",
"//third_party/gson:gson_java",
]
# Work-around for gradle generator not yet supporting annotation processors.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment