Commit d0a3e81f authored by Yun Liu's avatar Yun Liu Committed by Commit Bot

Use android_deps tool to generate androidx test libraries instead of download from maven manually.

As agrieve@ suggested, changed to use android_deps tool to get androidx test libraries from maven.
This can be easier to add more binaries and upgrade by version later.
Doc: https://chromium.googlesource.com/chromium/src/+/HEAD/tools/android/roll/android_deps/README.md

Bug: 900746
Change-Id: I631ed39e4bb07719ffe7d49c928380223def29af
Reviewed-on: https://chromium-review.googlesource.com/c/1478257Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarPeter Wen <wnwen@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Yun Liu <yliuyliu@google.com>
Cr-Commit-Position: refs/heads/master@{#634813}
parent 6fd768c6
......@@ -634,17 +634,6 @@ deps = {
'dep_type': 'cipd',
},
'src/third_party/androidx': {
'packages': [
{
'package': 'chromium/third_party/androidx',
'version': 'Z2TKYlinmuC0HUW4ulv89ataKxbXJDsnPYgylLVzuBEC',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/angle':
Var('chromium_git') + '/angle/angle.git' + '@' + Var('angle_revision'),
......@@ -1367,6 +1356,61 @@ deps = {
'dep_type': 'cipd',
},
'src/third_party/android_deps/libs/androidx_annotation_annotation': {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/androidx_annotation_annotation',
'version': 'version:1.0.0-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/android_deps/libs/androidx_lifecycle_lifecycle_common': {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/androidx_lifecycle_lifecycle_common',
'version': 'version:2.0.0-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/android_deps/libs/androidx_test_core': {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/androidx_test_core',
'version': 'version:1.0.0-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/android_deps/libs/androidx_test_ext_junit': {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/androidx_test_ext_junit',
'version': 'version:1.0.0-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/android_deps/libs/androidx_test_monitor': {
'packages': [
{
'package': 'chromium/third_party/android_deps/libs/androidx_test_monitor',
'version': 'version:1.1.0-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/android_deps/libs/com_android_support_animated_vector_drawable': {
'packages': [
{
......
......@@ -239,6 +239,35 @@ android_aar_prebuilt("android_arch_lifecycle_runtime_java") {
]
}
android_aar_prebuilt("androidx_test_core_java") {
testonly = true
aar_path = "libs/androidx_test_core/core-1.0.0.aar"
info_path = "libs/androidx_test_core/androidx_test_core.info"
deps = [
":androidx_annotation_annotation_java",
":androidx_lifecycle_lifecycle_common_java",
":androidx_test_monitor_java",
]
}
android_aar_prebuilt("androidx_test_ext_junit_java") {
testonly = true
aar_path = "libs/androidx_test_ext_junit/junit-1.0.0.aar"
info_path = "libs/androidx_test_ext_junit/androidx_test_ext_junit.info"
deps = [
"//third_party/junit:junit",
]
}
android_aar_prebuilt("androidx_test_monitor_java") {
testonly = true
aar_path = "libs/androidx_test_monitor/monitor-1.1.0.aar"
info_path = "libs/androidx_test_monitor/androidx_test_monitor.info"
deps = [
":androidx_annotation_annotation_java",
]
}
android_aar_prebuilt("com_android_support_appcompat_v7_java") {
aar_path = "libs/com_android_support_appcompat_v7/appcompat-v7-27.0.0.aar"
info_path = "libs/com_android_support_appcompat_v7/com_android_support_appcompat_v7.info"
......@@ -593,6 +622,24 @@ java_prebuilt("android_arch_core_common_java") {
]
}
java_prebuilt("androidx_annotation_annotation_java") {
jar_path = "libs/androidx_annotation_annotation/annotation-1.0.0.jar"
output_name = "androidx_annotation_annotation"
supports_android = true
visibility = [ ":*" ]
}
java_prebuilt("androidx_lifecycle_lifecycle_common_java") {
jar_path =
"libs/androidx_lifecycle_lifecycle_common/lifecycle-common-2.0.0.jar"
output_name = "androidx_lifecycle_lifecycle_common"
supports_android = true
visibility = [ ":*" ]
deps = [
":androidx_annotation_annotation_java",
]
}
android_aar_prebuilt("com_android_support_animated_vector_drawable_java") {
aar_path = "libs/com_android_support_animated_vector_drawable/animated-vector-drawable-27.0.0.aar"
info_path = "libs/com_android_support_animated_vector_drawable/com_android_support_animated_vector_drawable.info"
......
......@@ -2,6 +2,11 @@
"libs/android_arch_core_common",
"libs/android_arch_lifecycle_common",
"libs/android_arch_lifecycle_runtime",
"libs/androidx_annotation_annotation",
"libs/androidx_lifecycle_lifecycle_common",
"libs/androidx_test_core",
"libs/androidx_test_ext_junit",
"libs/androidx_test_monitor",
"libs/com_android_support_animated_vector_drawable",
"libs/com_android_support_appcompat_v7",
"libs/com_android_support_cardview_v7",
......
......@@ -175,3 +175,28 @@
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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
http://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.
file://third_party/android_deps/OWNERS
\ No newline at end of file
Name: Android Support Library Annotations
Short Name: annotation
URL: http://developer.android.com/tools/extras/support-library.html
Version: 1.0.0
License: Apache Version 2.0
License File: LICENSE
Security Critical: yes
Description:
The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs.
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/androidx
description: Androidx libray files
# cipd create --pkg-def cipd.yaml -tag version:1.0.0-cr0
package: chromium/third_party/android_deps/libs/androidx_annotation_annotation
description: "Android Support Library Annotations"
data:
- file: lib/core-1.0.0.aar
- file: lib/junit-1.0.0.aar
- file: lib/monitor-1.1.0.aar
- file: lib/annotation-1.0.0.jar
- file: lib/lifecycle-common-2.0.0.jar
- file: annotation-1.0.0.jar
file://third_party/android_deps/OWNERS
\ No newline at end of file
Name: Android Lifecycle-Common
Short Name: lifecycle-common
URL: https://developer.android.com/topic/libraries/architecture/index.html
Version: 2.0.0
License: Apache Version 2.0
License File: LICENSE
Security Critical: yes
Description:
Android Lifecycle-Common
Local Modifications:
No modifications.
# 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:2.0.0-cr0
package: chromium/third_party/android_deps/libs/androidx_lifecycle_lifecycle_common
description: "Android Lifecycle-Common"
data:
- file: lifecycle-common-2.0.0.jar
This diff is collapsed.
file://third_party/android_deps/OWNERS
\ No newline at end of file
Name: AndroidX Test Library
Short Name: core
URL: https://developer.android.com/testing
Version: 1.0.0
License: Apache Version 2.0
License File: LICENSE
Security Critical: yes
Description:
The AndroidX Test Library provides an extensive framework for testing Android apps
Local Modifications:
No modifications.
# 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:1.0.0-cr0
package: chromium/third_party/android_deps/libs/androidx_test_core
description: "AndroidX Test Library"
data:
- file: core-1.0.0.aar
This diff is collapsed.
file://third_party/android_deps/OWNERS
\ No newline at end of file
Name: AndroidX Test Library
Short Name: junit
URL: https://developer.android.com/testing
Version: 1.0.0
License: Apache Version 2.0
License File: LICENSE
Security Critical: yes
Description:
The AndroidX Test Library provides an extensive framework for testing Android apps
Local Modifications:
No modifications.
# 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:1.0.0-cr0
package: chromium/third_party/android_deps/libs/androidx_test_ext_junit
description: "AndroidX Test Library"
data:
- file: junit-1.0.0.aar
This diff is collapsed.
file://third_party/android_deps/OWNERS
\ No newline at end of file
Name: AndroidX Test Library
Short Name: monitor
URL: https://developer.android.com/testing
Version: 1.1.0
License: Apache Version 2.0
License File: LICENSE
Security Critical: yes
Description:
The AndroidX Test Library provides an extensive framework for testing Android apps
Local Modifications:
No modifications.
# 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:1.1.0-cr0
package: chromium/third_party/android_deps/libs/androidx_test_monitor
description: "AndroidX Test Library"
data:
- file: monitor-1.1.0.aar
# 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.
import("//build/config/android/rules.gni")
android_aar_prebuilt("androidx_core_java") {
# If this is not test only, there are security implications.
# Any changes from test only will need a review from security@chromium.org.
testonly = true
aar_path = "lib/core-1.0.0.aar"
deps = [
":androidx_monitor_java",
":lifecycle-common-2.0.0_java",
]
}
android_aar_prebuilt("androidx_junit_java") {
# If this is not test only, there are security implications.
# Any changes from test only will need a review from security@chromium.org.
testonly = true
aar_path = "lib/junit-1.0.0.aar"
deps = [
"//third_party/junit:junit",
]
}
android_aar_prebuilt("androidx_monitor_java") {
# If this is not test only, there are security implications.
# Any changes from test only will need a review from security@chromium.org.
testonly = true
aar_path = "lib/monitor-1.1.0.aar"
}
android_java_prebuilt("annotation-1.0.0_java") {
testonly = true
jar_path = "lib/annotation-1.0.0.jar"
}
android_java_prebuilt("lifecycle-common-2.0.0_java") {
testonly = true
jar_path = "lib/lifecycle-common-2.0.0.jar"
deps = [
":annotation-1.0.0_java",
]
}
name: "androidx"
description:
"AndroidX is the open-source project that the Android team uses to develop, "
"test, package, version and release libraries within Jetpack."
third_party {
url {
type: HOMEPAGE
value: "https://developer.android.com/jetpack/androidx/"
}
url {
type: ARCHIVE
value: "https://mvnrepository.com/artifact/androidx.test"
}
url {
type: GIT
value: "https://android.googlesource.com/platform/frameworks/support/+/androidx-1.0-dev"
}
version: "1.0.0"
last_upgrade_date { year: 2019 month: 1 day: 23 }
}
jbudorick@chromium.org
bjoyce@chromium.org
yliuyliu@chromium.org
yzjr@chromium.org
Name: Androidx
URL: https://developer.android.com/jetpack/androidx/
Version: 1.0.0
License: Apache 2.0
License File: NOT_SHIPPED
Security Critical: no
License Android Compatible: yes
Description: AndroidX is used to develop, test, package, version and release
libraries within Jetpack.
How To Update:
- Update file names in our BUILD.gn file.
- Update DEPS to new Androidx revision.
- Update CIPD package to include new Androidx libraries.
- add or update appropriate .info files outlined
in build/config/android/rules.gni for android_aar_prebuilt.
......@@ -70,9 +70,9 @@ java_library("robolectric_java") {
":robolectric_shadowapi_java",
":robolectric_utils_java",
":shadows_core_java",
"//third_party/androidx:androidx_core_java",
"//third_party/androidx:androidx_junit_java",
"//third_party/androidx:androidx_monitor_java",
"//third_party/android_deps:androidx_test_core_java",
"//third_party/android_deps:androidx_test_ext_junit_java",
"//third_party/android_deps:androidx_test_monitor_java",
"//third_party/bouncycastle:bouncycastle_java",
"//third_party/guava:guava_java",
"//third_party/jsr-305:jsr_305_javalib",
......
......@@ -79,6 +79,10 @@ dependencies {
// ARCore - needed for WebXR implementation on Android
compile "com.google.ar:core:1.6.0"
// Androidx test libraries
compile "androidx.test:core:1.0.0"
compile "androidx.test:monitor:1.1.0"
compile "androidx.test.ext:junit:1.0.0"
}
task setUpRepository(type: BuildConfigGenerator) {
......
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